diff --git a/IRC.Core.SCP/Service/CStoreSCPService.cs b/IRC.Core.SCP/Service/CStoreSCPService.cs index 1f2dae205..25fa9adcf 100644 --- a/IRC.Core.SCP/Service/CStoreSCPService.cs +++ b/IRC.Core.SCP/Service/CStoreSCPService.cs @@ -275,7 +275,7 @@ namespace IRaCIS.Core.SCP.Service var _distributedLockProvider = _serviceProvider.GetService(); var storeRelativePath = string.Empty; - var ossFolderPath = $"{_trialId}/Image/PACS/{_trialSiteId}{studyInstanceUid}"; + var ossFolderPath = $"{_trialId}/Image/PACS/{_trialSiteId}/{studyInstanceUid}"; long fileSize = 0; diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index d6fc51f50..68d71badf 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -1,5 +1,6 @@ using Amazon.Auth.AccessControlPolicy; using Amazon.SecurityToken; +using AutoMapper; using Azure.Core; using IdentityModel.Client; using IdentityModel.OidcClient; @@ -105,196 +106,6 @@ namespace IRaCIS.Api.Controllers - /// 系统用户登录接口[New] - [HttpPost, Route("user/login")] - [AllowAnonymous] - public async Task Login(UserLoginDTO loginUser, - [FromServices] IFusionCache _fusionCache, - [FromServices] IUserService _userService, - [FromServices] ITokenService _tokenService, - [FromServices] IReadingImageTaskService readingImageTaskService, - [FromServices] IOptionsMonitor _verifyConfig, - [FromServices] IOptionsMonitor _emailConfig, - - [FromServices] IMailVerificationService _mailVerificationService) - { - var emailConfig = _emailConfig.CurrentValue; - var companyInfo = new SystemEmailSendConfigView() { CompanyName = emailConfig.CompanyName, CompanyNameCN = emailConfig.CompanyNameCN, CompanyShortName = emailConfig.CompanyShortName, CompanyShortNameCN = emailConfig.CompanyShortNameCN }; - - //MFA 邮箱验证 前端传递用户Id 和MFACode - if (loginUser.UserId != null && _verifyConfig.CurrentValue.OpenLoginMFA) - { - Guid userId = (Guid)loginUser.UserId; - - //验证MFA 编码是否有问题 ,前端要拆开,自己调用验证的逻辑 - //await _userService.VerifyMFACodeAsync(userId, loginUser.MFACode); - - //var loginUser = await _userRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); - - var basicInfo = await _userService.GetUserBasicInfo(userId, loginUser.Password); - - var loginReturn = new LoginReturnDTO() { BasicInfo = basicInfo }; - - loginReturn.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(loginReturn.BasicInfo)); - - - // 创建一个 CookieOptions 对象,用于设置 Cookie 的属性 - var option = new CookieOptions - { - Expires = DateTime.Now.AddMonths(1), // 设置过期时间为 30 分钟之后 - HttpOnly = false, // 确保 cookie 只能通过 HTTP 访问 - SameSite = Microsoft.AspNetCore.Http.SameSiteMode.None, // 设置 SameSite 属性 - Secure = false // 确保 cookie 只能通过 HTTPS 访问 - }; - - HttpContext.Response.Cookies.Append("access_token", loginReturn.JWTStr, option); - - // 验证阅片休息时间 - await readingImageTaskService.ResetReadingRestTime(userId); - - await _fusionCache.SetAsync(CacheKeys.UserToken(userId), loginReturn.JWTStr, TimeSpan.FromDays(7)); - - await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(userId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(_verifyConfig.CurrentValue.AutoLoginOutMinutes)); - - loginReturn.CompanyInfo = companyInfo; - return ResponseOutput.Ok(loginReturn); - - } - else - { - var returnModel = await _userService.Login(loginUser.UserName, loginUser.Password); - - if (returnModel.IsSuccess) - { - #region GRPC 调用鉴权中心,因为服务器IIS问题 http/2 故而没法使用 - - ////重试策略 - //var defaultMethodConfig = new MethodConfig - //{ - // Names = { MethodName.Default }, - // RetryPolicy = new RetryPolicy - // { - // MaxAttempts = 3, - // InitialBackoff = TimeSpan.FromSeconds(1), - // MaxBackoff = TimeSpan.FromSeconds(5), - // BackoffMultiplier = 1.5, - // RetryableStatusCodes = { Grpc.Core.StatusCode.Unavailable } - // } - //}; - - //#region unable to trust the certificate then the gRPC client can be configured to ignore the invalid certificate - - //var httpHandler = new HttpClientHandler(); - //// Return `true` to allow certificates that are untrusted/invalid - //httpHandler.ServerCertificateCustomValidationCallback = - // HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; - - - //////这一句是让grpc支持本地 http 如果本地访问部署在服务器上,那么是访问不成功的 - //AppContext.SetSwitch( - // "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true); - - //#endregion - - - - //var grpcAdress = configuration.GetValue("GrpcAddress"); - ////var grpcAdress = "http://localhost:7200"; - - //var channel = GrpcChannel.ForAddress(grpcAdress, new GrpcChannelOptions - //{ - // HttpHandler = httpHandler, - // ServiceConfig = new ServiceConfig { MethodConfigs = { defaultMethodConfig } } - - //}); - ////var channel = GrpcChannel.ForAddress(grpcAdress); - //var grpcClient = new TokenGrpcService.TokenGrpcServiceClient(channel); - - //var userInfo = returnModel.Data.BasicInfo; - - //var tokenResponse = grpcClient.GetUserToken(new GetTokenReuqest() - //{ - // Id = userInfo.Id.ToString(), - // ReviewerCode = userInfo.ReviewerCode, - // IsAdmin = userInfo.IsAdmin, - // RealName = userInfo.RealName, - // UserTypeEnumInt = (int)userInfo.UserTypeEnum, - // UserTypeShortName = userInfo.UserTypeShortName, - // UserName = userInfo.UserName - //}); - - //returnModel.Data.JWTStr = tokenResponse.Token; - - #endregion - - var userId = returnModel.Data.BasicInfo.Id; - - if (_verifyConfig.CurrentValue.OpenLoginMFA) - { - - - - - //MFA 发送邮件 - - returnModel.Data.IsMFA = true; - - var email = returnModel.Data.BasicInfo.EMail; - - var hiddenEmail = IRCEmailPasswordHelper.MaskEmail(email); - - returnModel.Data.BasicInfo.EMail = hiddenEmail; - - //修改密码 - if (returnModel.Data.BasicInfo.IsFirstAdd || returnModel.Data.BasicInfo.LoginState == 1) - { - returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo)); - } - else - { - //正常登录才发送邮件 - await _userService.SendMFAEmail(userId); - - } - - } - else - { - returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo)); - - // 创建一个 CookieOptions 对象,用于设置 Cookie 的属性 - var option = new CookieOptions - { - Expires = DateTime.Now.AddMonths(1), // 设置过期时间为 30 分钟之后 - HttpOnly = false, // 确保 cookie 只能通过 HTTP 访问 - SameSite = Microsoft.AspNetCore.Http.SameSiteMode.None, // 设置 SameSite 属性 - Secure = false // 确保 cookie 只能通过 HTTPS 访问 - }; - - HttpContext.Response.Cookies.Append("access_token", returnModel.Data.JWTStr, option); - - - - // 验证阅片休息时间 - await readingImageTaskService.ResetReadingRestTime(returnModel.Data.BasicInfo.Id); - - await _fusionCache.SetAsync(CacheKeys.UserToken(userId), returnModel.Data.JWTStr, TimeSpan.FromDays(7)); - - await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(userId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(_verifyConfig.CurrentValue.AutoLoginOutMinutes)); - } - - } - - returnModel.Data.CompanyInfo = companyInfo; - return returnModel; - - } - - - - - } - [AllowAnonymous] [HttpGet, Route("user/getPublicKey")] public IResponseOutput GetPublicKey([FromServices] IOptionsMonitor _IRCEncreptOption) @@ -309,18 +120,13 @@ namespace IRaCIS.Api.Controllers [AllowAnonymous] public IResponseOutput ShareImage([FromServices] ITokenService _tokenService) { - var token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo() + var token = _tokenService.GetToken(new UserTokenInfo() { - Id = Guid.NewGuid(), - IsReviewer = false, - IsAdmin = false, - RealName = "Share001", + UserRoleId = Guid.NewGuid(), UserName = "Share001", - Sex = 0, - //UserType = "ShareType", UserTypeEnum = UserTypeEnum.ShareImage, - Code = "ShareCode001", - })); + + }); return ResponseOutput.Ok("/showdicom?studyId=f7b67793-8155-0223-2f15-118f2642efb8&type=Share&token=" + token); } @@ -379,7 +185,7 @@ namespace IRaCIS.Api.Controllers [HttpGet("User/UserRedirect")] [AllowAnonymous] - public async Task UserRedirect([FromServices] IRepository _userRepository, string url, [FromServices] ILogger _logger) + public async Task UserRedirect([FromServices] IRepository _useRepository, string url, [FromServices] ILogger _logger) { var decodeUrl = System.Web.HttpUtility.UrlDecode(url); @@ -395,7 +201,7 @@ namespace IRaCIS.Api.Controllers var errorUrl = domainStrList[0] + "//" + domainStrList[2] + "/error"; - if (!await _userRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd)) + if (!await _useRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd)) { decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(lang == "zh" ? "您的初始化链接已过期" : "Error!The initialization link has expired. Return")} "; } diff --git a/IRaCIS.Core.API/Controllers/FinancialChangeController.cs b/IRaCIS.Core.API/Controllers/FinancialChangeController.cs index 0fc0b5404..26115c1b1 100644 --- a/IRaCIS.Core.API/Controllers/FinancialChangeController.cs +++ b/IRaCIS.Core.API/Controllers/FinancialChangeController.cs @@ -51,30 +51,30 @@ namespace IRaCIS.Core.API.Controllers.Special [TrialGlobalLimit( "AddOrUpdateTrial", "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )] public async Task> AddOrUpdateTrial(TrialCommand param) { - var userId = Guid.Parse(User.FindFirst("id").Value); + //var userId = Guid.Parse(User.FindFirst("id").Value); var result = await _trialService.AddOrUpdateTrial(param); - if (_trialService.TrialExpeditedChange) - { - var needCalReviewerIds = await _trialService.GetTrialEnrollmentReviewerIds(param.Id.Value); - var calcList = await _calculateService.GetNeedCalculateReviewerList(Guid.Empty, string.Empty); + //if (_trialService.TrialExpeditedChange) + //{ + // var needCalReviewerIds = await _trialService.GetTrialEnrollmentReviewerIds(param.Id.Value); + // var calcList = await _calculateService.GetNeedCalculateReviewerList(Guid.Empty, string.Empty); - calcList.ForEach(t => - { - if (needCalReviewerIds.Contains(t.DoctorId)) - { - _calculateService.CalculateMonthlyPayment(new CalculateDoctorAndMonthDTO() - { - NeedCalculateReviewers = new List() - { - t.DoctorId - }, - CalculateMonth = DateTime.Parse(t.YearMonth) - }, User.FindFirst("id").Value); + // calcList.ForEach(t => + // { + // if (needCalReviewerIds.Contains(t.DoctorId)) + // { + // _calculateService.CalculateMonthlyPayment(new CalculateDoctorAndMonthDTO() + // { + // NeedCalculateReviewers = new List() + // { + // t.DoctorId + // }, + // CalculateMonth = DateTime.Parse(t.YearMonth) + // }, User.FindFirst("id").Value); - } - }); - } + // } + // }); + //} return result; } diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index 55ea2fdf5..56187a561 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -522,10 +522,10 @@ namespace IRaCIS.Core.API.Controllers [TrialGlobalLimit( "AfterStopCannNotOpt" )] [UnitOfWork] - public async Task ConfirmReReading(DataInspectionDto opt, [FromServices] IVisitTaskHelpeService _visitTaskCommonService, [FromServices] IVisitTaskService _visitTaskService) + public async Task ConfirmReReading(DataInspectionDto opt, [FromServices] IVisitTaskService _visitTaskService) { var singId = await _inspectionService.RecordSing(opt.SignInfo); - var result = await _visitTaskService.ConfirmReReading(opt.Data, _visitTaskCommonService); + var result = await _visitTaskService.ConfirmReReading(opt.Data); await _inspectionService.CompletedSign(singId, result); return result; } diff --git a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs index 11313c7be..e3a21dc66 100644 --- a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs +++ b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs @@ -297,7 +297,7 @@ namespace IRaCIS.Core.API.Controllers [HttpPost, Route("Study/ArchiveStudy")] [DisableFormValueModelBinding] [DisableRequestSizeLimit] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task ArchiveStudyNew(Guid trialId, Guid subjectVisitId, string studyInstanceUid, Guid? abandonStudyId, Guid studyMonitorId, [FromServices] ILogger _logger, [FromServices] IStudyService _studyService, @@ -370,7 +370,7 @@ namespace IRaCIS.Core.API.Controllers //await _uploadHub.Clients.All.ReceivProgressAsync(archiveStudyCommand.StudyInstanceUid, receivedCount); - await _uploadHub.Clients.User(_userInfo.Id.ToString()).ReceivProgressAsync(archiveStudyCommand.StudyInstanceUid, receivedCount); + await _uploadHub.Clients.User(_userInfo.UserRoleId.ToString()).ReceivProgressAsync(archiveStudyCommand.StudyInstanceUid, receivedCount); archiveResult.ReceivedFileCount = receivedCount; @@ -452,7 +452,7 @@ namespace IRaCIS.Core.API.Controllers /// /// [HttpPost, Route("Study/PreArchiveStudy")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task PreArchiveStudy(PreArchiveStudyCommand preArchiveStudyCommand, [FromServices] IStudyService _studyService, [FromServices] IRepository _studyMonitorRepository) @@ -488,7 +488,7 @@ namespace IRaCIS.Core.API.Controllers /// /// [HttpPost("NoneDicomStudy/UploadNoneDicomFile")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task UploadNoneDicomFile(UploadNoneDicomFileCommand incommand, [FromServices] IRepository _noneDicomStudyRepository, [FromServices] IRepository _studyMonitorRepository, @@ -560,7 +560,7 @@ namespace IRaCIS.Core.API.Controllers /// /// [HttpPost("QCOperation/UploadVisitCheckExcel/{trialId:guid}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task UploadVisitCheckExcel(Guid trialId, [FromServices] IOSSService oSSService, [FromServices] IRepository _inspectionFileRepository) { @@ -850,11 +850,18 @@ namespace IRaCIS.Core.API.Controllers throw new BusinessValidationFailedException(_localizer["UploadDownLoad_InvalidCenters"]); } - if (excelList.GroupBy(t => new { t.TrialSiteCode, t.UserTypeStr, t.Email }).Any(g => g.Count() > 1)) + foreach (var item in excelList.GroupBy(t => t.Email)) { - // 同一邮箱,同一用户类型,只能生成一个账户,请核查Excel数据 + var itemList = item.ToList(); - throw new BusinessValidationFailedException(_localizer["UploadDownLoad_CheckDuplicateAccounts"]); + var first = item.First(); + + if (itemList.Any(t => t.Email != first.Email || t.Phone != first.Phone || t.OrganizationName != first.OrganizationName || t.FirstName != first.FirstName || t.LastName != first.LastName)) + { + //同一邮箱,用户信息应该保持一致! + + throw new BusinessValidationFailedException(_localizer["UploadDownLoad_CheckDuplicateAccounts"]); + } } if (excelList.Any(t => !t.Email.Contains("@"))) diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index 222dde557..df2392c13 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -34,9 +34,6 @@ - - 系统用户登录接口[New] - 回调到前端,前端调用后端的接口 @@ -284,7 +281,7 @@ - + 重阅同意 diff --git a/IRaCIS.Core.API/SignalRHub/UploadHub.cs b/IRaCIS.Core.API/SignalRHub/UploadHub.cs index 662c298d9..5bcd9b7ac 100644 --- a/IRaCIS.Core.API/SignalRHub/UploadHub.cs +++ b/IRaCIS.Core.API/SignalRHub/UploadHub.cs @@ -17,7 +17,7 @@ namespace IRaCIS.Core.API { public virtual string GetUserId(HubConnectionContext connection) { - return connection.User?.FindFirst(JwtIRaCISClaimType.Id)?.Value!; + return connection.User?.FindFirst(JwtIRaCISClaimType.IdentityUserId)?.Value!; } } diff --git a/IRaCIS.Core.API/_PipelineExtensions/Serilog/SerilogConfig.cs b/IRaCIS.Core.API/_PipelineExtensions/Serilog/SerilogConfig.cs index 6492c25ae..7b35b71df 100644 --- a/IRaCIS.Core.API/_PipelineExtensions/Serilog/SerilogConfig.cs +++ b/IRaCIS.Core.API/_PipelineExtensions/Serilog/SerilogConfig.cs @@ -38,7 +38,7 @@ namespace IRaCIS.Core.API diagnosticContext.Set("QueryString", request.QueryString.Value); } - diagnosticContext.Set("FullName", httpContext?.User?.FindFirst(JwtIRaCISClaimType.RealName)?.Value); + diagnosticContext.Set("FullName", httpContext?.User?.FindFirst(JwtIRaCISClaimType.FullName)?.Value); diagnosticContext.Set("UserType", httpContext?.User?.FindFirst(JwtIRaCISClaimType.UserTypeShortName)?.Value); diff --git a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs index e5b2d247a..e79f50804 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs @@ -1,5 +1,6 @@ using EntityFramework.Exceptions.SqlServer; using IRaCIS.Core.Application.Triggers; +using IRaCIS.Core.Application.Triggers.AfterSaveTrigger; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Infra.EFCore.Interceptor; @@ -80,6 +81,11 @@ namespace IRaCIS.Core.API triggerOptions.AddTrigger(); triggerOptions.AddTrigger(); + + triggerOptions.AddTrigger(); + + triggerOptions.AddTrigger(); + }); diff --git a/IRaCIS.Core.API/wwwroot/swagger/ui/abp.swagger.js b/IRaCIS.Core.API/wwwroot/swagger/ui/abp.swagger.js index cf36aa096..7c05c38da 100644 --- a/IRaCIS.Core.API/wwwroot/swagger/ui/abp.swagger.js +++ b/IRaCIS.Core.API/wwwroot/swagger/ui/abp.swagger.js @@ -268,12 +268,12 @@ var abp = abp || {}; } function loginUserInternal(tenantId, callback) { - + var usernameOrEmailAddress = document.getElementById('userName').value; - if (!usernameOrEmailAddress) { - alert('UserName Can Not Be Null'); - return false; - } + // if (!usernameOrEmailAddress) { + // alert('UserName Can Not Be Null'); + // return false; + // } var password = document.getElementById('password').value; var pwdMd5 = document.getElementById('pwdMd5').value; @@ -286,12 +286,12 @@ var abp = abp || {}; var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { - + if (xhr.readyState === XMLHttpRequest.DONE) { - debugger; + // debugger; if (xhr.status === 200) { - debugger; - + // debugger; + var resultdata = JSON.parse(xhr.responseText); if (resultdata.ErrorMessage != '') { alert(resultdata.ErrorMessage); @@ -303,18 +303,23 @@ var abp = abp || {}; else { var responseJSON = JSON.parse(xhr.responseText); var result = responseJSON; - var expireDate = new Date(Date.now() + (60*60*24 * 1000)); + var expireDate = new Date(Date.now() + (60 * 60 * 24 * 1000)); abp.auth.setToken(result.Result.JWTStr, expireDate); - callback(); + let selectDom = document.getElementById("roleSelect") + selectDom.options.length = 0; + result.Result.BasicInfo.AccountList.forEach(item => { + selectDom.options.add(new Option(item.UserTypeShortName, item.Id)); + }) + // callback(); } - + } else { alert('Login failed !'); } } }; - - xhr.open('POST', '/user/login', true); + + xhr.open('POST', '/User/getUserLoginRoleList', true); xhr.setRequestHeader('Abp.TenantId', tenantId); xhr.setRequestHeader('Content-type', 'application/json'); var parm = { @@ -330,7 +335,63 @@ var abp = abp || {}; //xhr.send("{" + "userName:'" + usernameOrEmailAddress + "'," + "passWord:'" + password + "'}"); }; + function loginUserInternalRole(tenantId, callback) { + var usernameOrEmailAddress = document.getElementById('roleSelect').value; + //if (!usernameOrEmailAddress) { + // alert('UserName Can Not Be Null'); + // return false; + //} + + var password = document.getElementById('password').value; + var pwdMd5 = document.getElementById('pwdMd5').value; + console.log(pwdMd5); + if (!password && !pwdMd5) { + alert('PassWord And Md5 Can Not Be Null'); + return false; + } + + var xhr = new XMLHttpRequest(); + + xhr.onreadystatechange = function () { + + if (xhr.readyState === XMLHttpRequest.DONE) { + // debugger; + if (xhr.status === 200) { + // debugger; + + var resultdata = JSON.parse(xhr.responseText); + if (resultdata.ErrorMessage != '') { + alert(resultdata.ErrorMessage); + return false; + } + if (resultdata.code == 300) { + alert(resultdata.message); + } + else { + var responseJSON = JSON.parse(xhr.responseText); + var result = responseJSON; + var expireDate = new Date(Date.now() + (60 * 60 * 24 * 1000)); + abp.auth.setToken(result.Result, expireDate); + + callback(); + } + + } else { + alert('Login failed !'); + } + } + }; + + xhr.open('get', `/User/loginSelectUserRole?userRoleId=${usernameOrEmailAddress}`, true); + xhr.setRequestHeader('Abp.TenantId', tenantId); + xhr.setRequestHeader('Content-type', 'application/json'); + var authToken = abp.auth.getToken(); + xhr.setRequestHeader('Authorization', `Bearer ${authToken}`); + xhr.send(); + //xhr.send("{" + "userName:'" + usernameOrEmailAddress + "'," + "passWord:'" + password + "'}"); + + }; abp.swagger.login = function (callback) { //Get TenantId first var tenancyName = document.getElementById('tenancyName').value; @@ -356,6 +417,31 @@ var abp = abp || {}; loginUserInternal(null, callback); // Login for host } }; + abp.swagger.loginRole = function (callback) { + //Get TenantId first + var tenancyName = document.getElementById('tenancyName').value; + + if (tenancyName) { + var xhrTenancyName = new XMLHttpRequest(); + xhrTenancyName.onreadystatechange = function () { + if (xhrTenancyName.readyState === XMLHttpRequest.DONE && xhrTenancyName.status === 200) { + var responseJSON = JSON.parse(xhrTenancyName.responseText); + var result = responseJSON.result; + if (result.state === 1) { // Tenant exists and active. + loginUserInternalRole(result.tenantId, callback); // Login for tenant + } else { + alert('There is no such tenant or tenant is not active !'); + } + } + }; + + xhrTenancyName.open('POST', '/api/services/app/Account/IsTenantAvailable', true); + xhrTenancyName.setRequestHeader('Content-type', 'application/json'); + xhrTenancyName.send("{" + "tenancyName:'" + tenancyName + "'}"); + } else { + loginUserInternalRole(null, callback); // Login for host + } + }; abp.swagger.logout = function () { abp.auth.clearToken(); @@ -419,9 +505,10 @@ var abp = abp || {}; //Inputs createInput(modalUxContent, 'tenancyName', 'Tenancy Name (Leave empty for Host)'); - createInput(modalUxContent, 'userName', 'Username or email address','text','cyldev'); + createInput(modalUxContent, 'userName', 'Username or email address', 'text', 'cyldev'); createInput(modalUxContent, 'password', 'Password', 'password', '123456'); createInput(modalUxContent, 'pwdMd5', 'PwdMd5', 'text', ''); + createSelect(modalUxContent, 'roleSelect', 'role', []) //Buttons var authBtnWrapper = document.createElement('div'); @@ -444,9 +531,18 @@ var abp = abp || {}; abp.swagger.login(loginCallback); }; authBtnWrapper.appendChild(authorizeButton); + + // login role + var authorizeButton = document.createElement('button'); + authorizeButton.className = 'btn modal-btn auth authorize button'; + authorizeButton.innerText = 'LoginRole'; + authorizeButton.onclick = function () { + abp.swagger.loginRole(loginCallback); + }; + authBtnWrapper.appendChild(authorizeButton); } - function createInput(container, id, title, type, value="") { + function createInput(container, id, title, type, value = "") { var wrapper = document.createElement('div'); wrapper.className = 'wrapper'; if (id == "tenancyName") { @@ -470,6 +566,31 @@ var abp = abp || {}; input.autocomplete = "off"; + section.appendChild(input); + } + function createSelect(container, id, title, option = []) { + var wrapper = document.createElement('div'); + wrapper.className = 'wrapper'; + if (id == "tenancyName") { + wrapper.style.display = 'none'; + } + container.appendChild(wrapper); + + var label = document.createElement('label'); + label.innerText = title; + wrapper.appendChild(label); + + var section = document.createElement('section'); + section.className = 'block-tablet col-10-tablet block-desktop col-10-desktop'; + wrapper.appendChild(section); + + var input = document.createElement('select'); + input.id = id; + input.style.width = '100%'; + option.forEach(item => { + input.options.add(new Option(item.UserTypeShortName, item.Id)); + }) + section.appendChild(input); } diff --git a/IRaCIS.Core.Application/Auth/IRaCISClaims.cs b/IRaCIS.Core.Application/Auth/IRaCISClaims.cs deleted file mode 100644 index 3eefc9fd2..000000000 --- a/IRaCIS.Core.Application/Auth/IRaCISClaims.cs +++ /dev/null @@ -1,46 +0,0 @@ -using IRaCIS.Application.Contracts; -using IRaCIS.Core.Domain.Share; - -namespace IRaCIS.Core.Application.Auth -{ - public class IRaCISClaims - { - public Guid Id { get; set; } - public string FullName { get; set; } = String.Empty; - public string Code { get; set; } = String.Empty; - public string RealName { get; set; } = String.Empty; - - public string UserTypeShortName { get; set; } = String.Empty; - - public UserTypeEnum UserTypeEnum { get; set; } - - public string PermissionStr { get; set; } = String.Empty; - - public Guid UserTypeId { get; set; } - - public int IsAdmin { get; } - - public bool IsTestUser { get; set; } - - public bool IsZhiZhun { get; set; } - - public string Phone { get; set; } = String.Empty; - - public static IRaCISClaims Create(UserBasicInfo user) - { - return new IRaCISClaims - { - Id = user.Id, - FullName = user.UserName, - RealName = user.RealName, - UserTypeEnum = user.UserTypeEnum, - UserTypeId = user.UserTypeId, - IsTestUser = user.IsTestUser, - Code = user.Code, - PermissionStr = user.PermissionStr, - IsZhiZhun = user.IsZhiZhun, - UserTypeShortName = user.UserTypeShortName - }; - } - } -} \ No newline at end of file diff --git a/IRaCIS.Core.Application/Auth/TokenService.cs b/IRaCIS.Core.Application/Auth/TokenService.cs index d9e5f0214..3a06e579c 100644 --- a/IRaCIS.Core.Application/Auth/TokenService.cs +++ b/IRaCIS.Core.Application/Auth/TokenService.cs @@ -8,7 +8,7 @@ namespace IRaCIS.Core.Application.Auth public interface ITokenService { - string GetToken(IRaCISClaims user); + string GetToken(UserTokenInfo user); } @@ -21,16 +21,16 @@ namespace IRaCIS.Core.Application.Auth _jwtSetting = option.Value; } - public string GetToken(IRaCISClaims user) + public string GetToken(UserTokenInfo user) { //创建用户身份标识,可按需要添加更多信息 var claims = new Claim[] { new Claim(Microsoft.IdentityModel.JsonWebTokens.JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()), - new Claim(JwtIRaCISClaimType.Id, user.Id.ToString()), - new Claim(JwtIRaCISClaimType.Name, user.FullName), - new Claim(JwtIRaCISClaimType.RealName, user.RealName), - new Claim(JwtIRaCISClaimType.Code,user.Code), + new Claim(JwtIRaCISClaimType.IdentityUserId, user.IdentityUserId.ToString()), + new Claim(JwtIRaCISClaimType.UserRoleId, user.UserRoleId.ToString()), + new Claim(JwtIRaCISClaimType.UserName, user.UserName), + new Claim(JwtIRaCISClaimType.FullName, user.FullName), new Claim(JwtIRaCISClaimType.UserTypeId,user.UserTypeId.ToString()), new Claim(JwtIRaCISClaimType.UserTypeEnum,user.UserTypeEnum.ToString()), new Claim(JwtIRaCISClaimType.UserTypeEnumInt,((int)user.UserTypeEnum).ToString()), diff --git a/IRaCIS.Core.Application/Auth/UserTokenInfo.cs b/IRaCIS.Core.Application/Auth/UserTokenInfo.cs new file mode 100644 index 000000000..ab104ae58 --- /dev/null +++ b/IRaCIS.Core.Application/Auth/UserTokenInfo.cs @@ -0,0 +1,27 @@ +using IRaCIS.Application.Contracts; +using IRaCIS.Core.Domain.Share; + +namespace IRaCIS.Core.Application.Auth +{ + public class UserTokenInfo + { + public Guid IdentityUserId { get; set; } + + public Guid UserRoleId { get; set; } + + public Guid UserTypeId { get; set; } + + public UserTypeEnum UserTypeEnum { get; set; } + + public string UserName { get; set; } = string.Empty; + public string FullName { get; set; } = string.Empty; + + public string PermissionStr { get; set; } = string.Empty; + + public bool IsTestUser { get; set; } + + public bool IsZhiZhun { get; set; } + + public string UserTypeShortName { get; set; } = string.Empty; + } +} \ No newline at end of file diff --git a/IRaCIS.Core.Application/BusinessFilter/LegacyController/LimitUserRequestAuthorization.cs b/IRaCIS.Core.Application/BusinessFilter/LegacyController/LimitUserRequestAuthorization.cs index 69bafe0f9..c720cd597 100644 --- a/IRaCIS.Core.Application/BusinessFilter/LegacyController/LimitUserRequestAuthorization.cs +++ b/IRaCIS.Core.Application/BusinessFilter/LegacyController/LimitUserRequestAuthorization.cs @@ -48,7 +48,7 @@ public class LimitUserRequestAuthorization( //2、在这里取缓存 进行比较 看是否有其他人进行了登陆,如果其他人登陆了,就把之前用户挤掉 - var cacheUserToken = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserToken(_userInfo.Id)); + var cacheUserToken = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserToken(_userInfo.IdentityUserId)); @@ -58,17 +58,17 @@ public class LimitUserRequestAuthorization( cacheUserToken = _userInfo.UserToken; //设置当前用户最新Token - await _fusionCache.SetAsync(CacheKeys.UserToken(_userInfo.Id), _userInfo.UserToken, TimeSpan.FromDays(7)); + await _fusionCache.SetAsync(CacheKeys.UserToken(_userInfo.IdentityUserId), _userInfo.UserToken, TimeSpan.FromDays(7)); //重启应用程序,所有人续期,不一下子踢出所有人 - await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes)); + await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(_userInfo.IdentityUserId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes)); } //是同一个人 else if (cacheUserToken == _userInfo.UserToken) { - var cacheTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserAutoLoginOut(_userInfo.Id)); + var cacheTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserAutoLoginOut(_userInfo.IdentityUserId)); //过期了 需要自动退出 if (string.IsNullOrEmpty(cacheTime)) @@ -80,7 +80,7 @@ public class LimitUserRequestAuthorization( } else { - await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes)); + await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(_userInfo.IdentityUserId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes)); } } else @@ -93,6 +93,21 @@ public class LimitUserRequestAuthorization( } + //用户或者角色禁用,那么操作的人退出 + + var isDisable = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserDisable(_userInfo.IdentityUserId),false); + + var isRoleDisable = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserRoleDisable(_userInfo.UserRoleId),false); + + if (isDisable == true || isRoleDisable == true) + { + context.HttpContext.Response.ContentType = "application/json"; + context.HttpContext.Response.StatusCode = StatusCodes.Status403Forbidden; + // 用户或者角色被禁用。 + + context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["LimitUser_AccountOrRoleDisable"], ApiResponseCodeEnum.AutoLoginOut)); + } + } } diff --git a/IRaCIS.Core.Application/BusinessFilter/MinimalAPI/LimitUserRequestAuthorizationEndpointFilter.cs b/IRaCIS.Core.Application/BusinessFilter/MinimalAPI/LimitUserRequestAuthorizationEndpointFilter.cs index 0d7a9f5a3..551b74978 100644 --- a/IRaCIS.Core.Application/BusinessFilter/MinimalAPI/LimitUserRequestAuthorizationEndpointFilter.cs +++ b/IRaCIS.Core.Application/BusinessFilter/MinimalAPI/LimitUserRequestAuthorizationEndpointFilter.cs @@ -41,19 +41,19 @@ public class LimitUserRequestAuthorizationEndpointFilter( } // 获取缓存中的用户 token - var cacheUserToken = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserToken(_userInfo.Id)); + var cacheUserToken = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserToken(_userInfo.IdentityUserId)); // 缓存中没有取到 token if (string.IsNullOrWhiteSpace(cacheUserToken)) { // 设置当前用户最新 token - await _fusionCache.SetAsync(CacheKeys.UserToken(_userInfo.Id), _userInfo.UserToken, TimeSpan.FromDays(7)); - await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes)); + await _fusionCache.SetAsync(CacheKeys.UserToken(_userInfo.IdentityUserId), _userInfo.UserToken, TimeSpan.FromDays(7)); + await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(_userInfo.IdentityUserId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes)); } // 如果是同一个用户 else if (cacheUserToken == _userInfo.UserToken) { - var cacheTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserAutoLoginOut(_userInfo.Id)); + var cacheTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.UserAutoLoginOut(_userInfo.IdentityUserId)); // 如果过期,自动登出 if (string.IsNullOrEmpty(cacheTime)) @@ -63,7 +63,7 @@ public class LimitUserRequestAuthorizationEndpointFilter( } else { - await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes)); + await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(_userInfo.IdentityUserId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes)); } } else diff --git a/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs b/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs index e2c6fcddb..2340b302f 100644 --- a/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs +++ b/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs @@ -140,7 +140,7 @@ public static class AppSettings case nameof(Doctor): return IRaCISBasicConfig.DoctorCodePrefix + codeInt.ToString("D4"); - case nameof(User): + case nameof(IdentityUser): return IRaCISBasicConfig.UserCodePrefix + codeInt.ToString("D4"); case nameof(QCChallenge): diff --git a/IRaCIS.Core.Application/GlobalUsings.cs b/IRaCIS.Core.Application/GlobalUsings.cs index b1a5af97b..7712c2f49 100644 --- a/IRaCIS.Core.Application/GlobalUsings.cs +++ b/IRaCIS.Core.Application/GlobalUsings.cs @@ -10,5 +10,6 @@ global using Microsoft.Extensions.Localization; global using AutoMapper; global using IRaCIS.Core.Domain.Share; global using IRaCIS.Core.Application.BusinessFilter; +global using IdentityUser = IRaCIS.Core.Domain.Models.IdentityUser; diff --git a/IRaCIS.Core.Application/Helper/CacheHelper.cs b/IRaCIS.Core.Application/Helper/CacheHelper.cs index 50deb6ccf..fa33c859e 100644 --- a/IRaCIS.Core.Application/Helper/CacheHelper.cs +++ b/IRaCIS.Core.Application/Helper/CacheHelper.cs @@ -27,6 +27,11 @@ public static class CacheKeys //超时没请求接口自动退出 public static string UserAutoLoginOut(Guid userId) => $"UserAutoLoginOut:{userId}"; + + public static string UserDisable(Guid userId) => $"UserDisable:{userId}"; + + public static string UserRoleDisable(Guid userRoleId) => $"UserRoleDisable:{userRoleId}"; + /// /// 用户登录错误 限制登录 /// diff --git a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs index 48700c78c..58223c3bf 100644 --- a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs +++ b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs @@ -64,7 +64,7 @@ public static class ExcelExportHelper foreach (var key in dic.Keys) { //是数组 那么找到对应的属性 进行翻译 - if (dic[key]!=null && dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>))) + if (dic[key] != null && dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>))) { var newObjList = new List(); @@ -255,9 +255,13 @@ public static class ExcelExportHelper /// public int AutoColumnTitleRowIndex { get; set; } - + /// + /// 模板列最后的索引 + /// public int TempalteLastColumnIndex { get; set; } + public List CDISCList { get; set; } = new List(); + /// /// 动态的列名 /// @@ -421,7 +425,7 @@ public static class ExcelExportHelper workbook.RemoveSheetAt(1); } - //中文替换项目术语 + #region 中文替换项目术语 if (data.TrialObjectNameList?.Count > 0) { var replaceObjectList = data.TrialObjectNameList; @@ -457,6 +461,9 @@ public static class ExcelExportHelper } } } + #endregion + + if (dynamicColumnConfig != null) { @@ -468,6 +475,7 @@ public static class ExcelExportHelper //动态移除列的数量 var dynamicRemoveColunmCount = dynamicColumnConfig.RemoveColunmIndexList.Count(); + //在动态列开始前移除的数量 var beforeDynamicRemoveCount = dynamicColumnConfig.RemoveColunmIndexList.Where(t => t < dynamicColumnConfig.AutoColumnStartIndex).Count(); //动态添加列的数量 @@ -635,6 +643,311 @@ public static class ExcelExportHelper } + public static async Task<(MemoryStream, string)> CDISC_DataExport_Async(string code, ExcelExportInfo data, IRepository _commonDocumentRepository, IWebHostEnvironment _hostEnvironment, IDictionaryService? _dictionaryService = null, Type? translateType = null, CriterionType? criterionType = null, DynamicColumnConfig? dynamicColumnConfig = null) + { + var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US; + //判断是否有字典翻译 + + object translateData = data; + + Dictionary translatedDic = default; + + if (_dictionaryService != null && translateType != null) + { + + //一个值 对应不同的字典翻译 + var needTranslatePropertyList = translateType.GetProperties().Where(t => t.IsDefined(typeof(DictionaryTranslateAttribute), true)) + .SelectMany(c => + c.GetCustomAttributes(typeof(DictionaryTranslateAttribute), false).Select(f => (DictionaryTranslateAttribute?)f).Where(t => t.CriterionType == criterionType || t.CriterionType == null) + .Select(k => new { c.Name, k.DicParentCode, k.IsTranslateDenpendOtherProperty, k.DependPropertyName, k.DependPropertyValueStr }) + ).ToList(); + + + + //字典表查询出所有需要翻译的数据 + + var translateDataList = await _dictionaryService.GetBasicDataSelect(needTranslatePropertyList.Select(t => t.DicParentCode).Distinct().ToArray()); + + var dic = data.ConvertToDictionary(); + //var dic = (JsonConvert.DeserializeObject>(data.ToJsonNotIgnoreNull())).IfNullThrowException(); + + foreach (var key in dic.Keys) + { + //是数组 那么找到对应的属性 进行翻译 + if (dic[key] != null && dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>))) + //if (dic[key].GetType().IsAssignableFrom(typeof(JArray))) + { + + var newObjList = new List(); + var no = 1; + foreach (var item in dic[key] as IList) + //foreach (var item in dic[key] as JArray) + { + //var itemDic = JsonConvert.DeserializeObject>(item.ToJsonNotIgnoreNull()); + var itemDic = item.ConvertToDictionary(); + + foreach (var needTranslateProperty in needTranslatePropertyList) + { + if (itemDic.Keys.Any(t => t == needTranslateProperty.Name)) + { + //翻译的属性依赖其他属性 + if (needTranslateProperty.IsTranslateDenpendOtherProperty) + { + if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower()) + { + var beforeValue = itemDic[needTranslateProperty.Name]?.ToString(); + + itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty; + } + } + //普通翻译 或者某一标准翻译 + else + { + var beforeValue = itemDic[needTranslateProperty.Name]?.ToString(); + + + itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty; + } + } + + + + + } + + itemDic.Add("No", no++); + newObjList.Add(itemDic); + } + + dic[key] = newObjList; + + } + } + + + //data = dic; + translateData = dic; + translatedDic = dic; + + } + + + var (physicalPath, fileName) = await FileStoreHelper.GetCommonDocPhysicalFilePathAsync(_hostEnvironment, _commonDocumentRepository, code); + + + //模板路径 + var tplPath = physicalPath; + + #region 根据中英文 删除模板sheet + + // 打开模板文件 + var templateFile = new FileStream(tplPath, FileMode.Open, FileAccess.Read); + + // 获取文件流 + var templateStream = new MemoryStream(); + templateFile.CopyTo(templateStream); + templateStream.Seek(0, SeekOrigin.Begin); + + var workbook = new XSSFWorkbook(templateStream); + + int sheetCount = workbook.NumberOfSheets; + + if (sheetCount == 2) + { + if (isEn_US) + { + workbook.RemoveSheetAt(0); + } + else + { + workbook.RemoveSheetAt(1); + } + + if (dynamicColumnConfig != null) + { + var sheet = workbook.GetSheetAt(0); + + + var cdicsRow = sheet.GetRow(dynamicColumnConfig.AutoColumnTitleRowIndex - 1); + var titelRow = sheet.GetRow(dynamicColumnConfig.AutoColumnTitleRowIndex); + var templateRow = sheet.GetRow(dynamicColumnConfig.AutoColumnTitleRowIndex + 1); + + //动态移除列的数量 + var dynamicRemoveColunmCount = dynamicColumnConfig.RemoveColunmIndexList.Count(); + + //在动态列开始前移除的数量 + var beforeDynamicRemoveCount = dynamicColumnConfig.RemoveColunmIndexList.Where(t => t < dynamicColumnConfig.AutoColumnStartIndex).Count(); + + //动态添加列的数量 + var needAddCount = dynamicColumnConfig.ColumnNameList.Count; + + //原始表 最终索引 + var originTotalEndIndex = dynamicColumnConfig.TempalteLastColumnIndex; + + //减去动态移除后原始结束索引 + var originRemoveEndIndex = originTotalEndIndex - dynamicRemoveColunmCount; + + //最终表 动态列开始索引 + var dynamicColunmStartIndex = dynamicColumnConfig.AutoColumnStartIndex - beforeDynamicRemoveCount; + + //最终表 动态列的终止索引 + var dynamicColunmEndIndex = dynamicColunmStartIndex + needAddCount - 1; + + //最终表 最终索引 + var totalColunmEndIndex = originTotalEndIndex + needAddCount - dynamicRemoveColunmCount; + + + //动态列后需要移动的数量 + var backMoveCount = totalColunmEndIndex - dynamicColunmEndIndex; + + //删除需要动态删除的列 从大到小移除,否则索引会变 + foreach (var removeIndex in dynamicColumnConfig.RemoveColunmIndexList.OrderByDescending(t => t)) + { + //将后面的列向前移动 + for (var i = 0; i < originTotalEndIndex - removeIndex; i++) + { + Console.WriteLine(titelRow.GetCell(removeIndex + i + 1).StringCellValue); + titelRow.GetCell(removeIndex + i).SetCellValue(titelRow.GetCell(removeIndex + i + 1).StringCellValue); + templateRow.GetCell(removeIndex + i).SetCellValue(templateRow.GetCell(removeIndex + i + 1).StringCellValue); + + //后面的数据要清空 + titelRow.GetCell(removeIndex + i + 1).SetCellValue(""); + templateRow.GetCell(removeIndex + i + 1).SetCellValue(""); + + } + + } + + //创建新的列 + for (int i = originTotalEndIndex; i < originTotalEndIndex + needAddCount; i++) + { + cdicsRow.CreateCell(i + 1); + titelRow.CreateCell(i + 1); + templateRow.CreateCell(i + 1); + } + //移动Title 和下面的模板标识 + + var gap = totalColunmEndIndex - originRemoveEndIndex; + + for (int i = totalColunmEndIndex; i > dynamicColunmEndIndex; i--) + { + + titelRow.GetCell(i).SetCellValue(titelRow.GetCell(i - gap).StringCellValue); + + templateRow.GetCell(i).SetCellValue(templateRow.GetCell(i - gap).StringCellValue); + } + + + + //设置动态Tilte + + for (int i = dynamicColunmStartIndex; i < dynamicColunmStartIndex + needAddCount; i++) + { + var name = dynamicColumnConfig.ColumnNameList[i - dynamicColunmStartIndex]; + + var cdicsCode= dynamicColumnConfig.CDISCList[i - dynamicColunmStartIndex]; + + cdicsRow.GetCell(i).SetCellValue(cdicsCode); + titelRow.GetCell(i).SetCellValue(name); + templateRow.GetCell(i).SetCellValue(""); + } + } + + using (var memoryStream2 = new MemoryStream()) + { + workbook.Write(memoryStream2, true); + + memoryStream2.Seek(0, SeekOrigin.Begin); + + templateStream = memoryStream2; + } + + } + + #endregion + + #region MiniExcel + + var memoryStream = new MemoryStream(); + + var config = new OpenXmlConfiguration() + { + IgnoreTemplateParameterMissing = true, + }; + + await MiniExcel.SaveAsByTemplateAsync(memoryStream, templateStream.ToArray(), translateData, config); + + memoryStream.Seek(0, SeekOrigin.Begin); + + if (dynamicColumnConfig != null) + { + var dynamicTranslateDataList = await _dictionaryService.GetBasicDataSelect(dynamicColumnConfig.TranslateDicNameList.ToArray()); + + // 使用NPOI 进行二次处理 + var wb = new XSSFWorkbook(memoryStream); + var sheet = wb.GetSheetAt(0); + + var list = translatedDic["List"] as IList; + + foreach (var itemResult in list) + { + var index = list.IndexOf(itemResult); + + //从第四行开始处理动态列 + var row = sheet.GetRow(index + dynamicColumnConfig.AutoColumnTitleRowIndex + 1); + + var itemDic = itemResult.ToDictionary(); + + var itemList = itemDic[dynamicColumnConfig.DynamicListName] as IList; + + //这个数组是动态的,有的多,有的少,所以在此对比Title 一致才赋值 + foreach (var itemObj in itemList) + { + + var iteObjDic = itemObj.ToDictionary(); + + var itemDicName = iteObjDic[dynamicColumnConfig.DynamicItemDicName]?.ToString(); + var itemValue = iteObjDic[dynamicColumnConfig.DynamicItemValueName]?.ToString(); + + //var writeIndex = itemList.IndexOf(itemObj) + dynamicColumnConfig.AutoColumnStartIndex; + + var writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex; + + if (itemDicName.IsNotNullOrEmpty()) + { + + var translatedItemData = dynamicTranslateDataList[itemDicName].Where(t => t.Code.ToLower() == itemValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty; + + row.GetCell(writeIndex).SetCellValue(translatedItemData); + } + else + { + row.GetCell(writeIndex).SetCellValue(itemValue); + + } + + } + } + + var memoryStream2 = new MemoryStream(); + wb.Write(memoryStream2, true); + memoryStream2.Seek(0, SeekOrigin.Begin); + + memoryStream = memoryStream2; + + } + + + return (memoryStream, fileName); + + + + + #endregion + } + + + /// /// 导出文件模板 /// diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index c9bfa490c..d72802c4c 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -67,6 +67,11 @@ 动态列开始的行index 从0开始 + + + 模板列最后的索引 + + 动态的列名 @@ -116,7 +121,7 @@ 分配规则 - + 分配规则 @@ -147,7 +152,7 @@ 一致性分析配置表 - + 一致性分析配置表 @@ -237,7 +242,7 @@ 医学审核生成规则 废弃 - + 医学审核生成规则 废弃 @@ -247,7 +252,7 @@ 任务医学审核 - + 任务医学审核 @@ -344,7 +349,7 @@ 访视读片任务 - + 访视读片任务 @@ -489,14 +494,6 @@ - - - 重阅原任务跟踪处理 - - - - - PM 申请重阅 被同意 或者 PM 直接退回的时候影响 @@ -504,12 +501,11 @@ - + 确认重阅与否 1同意 2 拒绝 - @@ -679,7 +675,7 @@ - + 项目参与人员导出 @@ -687,11 +683,11 @@ - + - + Site用户列表导出 @@ -699,7 +695,7 @@ - + @@ -726,7 +722,7 @@ - + getDocumentConfirmList 培训记录导出--new @@ -923,7 +919,7 @@ - + 阅片结果表、阅片结果明细,评估病灶明细表, 裁判明细表导出,条件通过 ReadingExportType ( 1,2,3,4)区分 @@ -983,7 +979,7 @@ InternationalizationService - + InternationalizationService @@ -1329,7 +1325,7 @@ TrialEmailNoticeConfigService - + TrialEmailNoticeConfigService @@ -1941,7 +1937,7 @@ FrontAuditConfigService - + FrontAuditConfigService @@ -2210,7 +2206,7 @@ 重置密码为 默认密码 - + @@ -2233,7 +2229,7 @@ (未登陆) 设置新密码 - + @@ -2254,7 +2250,6 @@ 根据用户Id获取用户详细信息[New] - xiuga @@ -2271,34 +2266,16 @@ - - - 删除用户 - - - - - - - 禁用或者启用账户 - - - - - - + 发送MFA 验证邮件 - - - + 验证MFA 邮件 - @@ -2311,6 +2288,22 @@ + + + 账号验证,获取账号角色信息 获取临时token + + + + + + + 验证密码成功后,选定角色,然后获取当前角色的Token + + + + + + 获取数据库的表信息 以及字段信息 @@ -4196,6 +4189,76 @@ + + + 获取阅片的计算数据 + + + + + + + 删除病灶获取起始病灶序号 + + + + + + 获取阅片报告 + + + + + + + 将上一次的访视病灶添加到这一次 + + + + + + + 测试计算 + + + + + + + + 计算任务 + + + + + + + 自动计算 + + + + + + + + 获取脂肪分数平均值 + + + + + + + 获取脂肪肝分级 + + + + + + + 计算平均值 + + + 获取阅片的计算数据 @@ -7535,6 +7598,11 @@ 任务Id + + + 保存表格问题标记 + + 问题类型 @@ -9575,6 +9643,11 @@ 问题标识 + + + 默认值 + + 问题英文名称 @@ -9668,6 +9741,11 @@ 问题标识 + + + 默认值 + + 问题英文名称 @@ -9706,6 +9784,11 @@ 是否公共分页 + + + 标准分组 + + 描述 @@ -9736,6 +9819,11 @@ 修约小数点 + + + 标准分组 + + eCRF报告是否显示在图像页面 @@ -9791,11 +9879,6 @@ - - - 导出标识 - - 分组 @@ -10046,11 +10129,6 @@ 分类显示类型 是否显示 - - - 导出标识 - - 分类问题类型 @@ -10351,6 +10429,11 @@ 是否是裁判问题 + + + 默认值 + + 分类编辑类型 是否可编辑 @@ -10361,6 +10444,16 @@ 分类显示类型 是否显示 + + + 导出的CDISCName + + + + + 导出的CDISCName + + 标准ID @@ -10466,11 +10559,6 @@ 分类显示类型 是否显示 - - - 导出标识 - - 导出结果 @@ -10696,11 +10784,6 @@ 分类显示类型 是否显示 - - - 导出标识 - - 高亮问题的答案 @@ -10941,6 +11024,11 @@ 返回的对象 + + + 标准分组 + + 标准ID @@ -10981,6 +11069,11 @@ 返回的对象 + + + 标准分组 + + 系统标准ID @@ -11677,6 +11770,20 @@ 阅片问题.标准 + + + 设置项目问题导出 + + + + + + + 获取项目的导出信息 + + + + 获取自定义表格问题预览 @@ -11940,7 +12047,7 @@ - + IR影像阅片 @@ -11952,6 +12059,30 @@ + + + 删除单个表格问题标记 + + + + + + + + 删除表格问题标记 + + + + + + + + 保存表格问题标记 + + + + + 获取既往病灶的OtherPicture @@ -12125,7 +12256,7 @@ - + 获取子元素 @@ -12188,6 +12319,14 @@ + + + 提交表格行信息 + + + + + 提交表格问题答案 提交病灶 保存病灶 @@ -12513,7 +12652,7 @@ 生成的阅片模块(在大列表上展示的) 阅片期 - + 生成的阅片模块(在大列表上展示的) 阅片期 @@ -12608,7 +12747,7 @@ 用户WL模板 - + 用户WL模板 @@ -12652,7 +12791,7 @@ Dashboard统计、全局工作量统计、入组两个维度统计(按照项目、按照人) - + Dashboard统计、全局工作量统计、入组两个维度统计(按照项目、按照人) @@ -12771,7 +12910,7 @@ 项目外部人员 录入流程相关 - + 项目外部人员 录入流程相关 @@ -12790,8 +12929,12 @@ - - Setting页面 为 site 勾选CRC用户列表 + + + 项目人员 邮件过期 重新发送邀请邮件 + + + Setting页面 项目参与人员勾选列表 @@ -12803,8 +12946,8 @@ - - 项目参与人员退出 其中IQC退出 回去释放工作量 + + Setting页面 为 site 勾选CRC用户列表 @@ -12827,6 +12970,13 @@ + + + 标记项目删除 + + + + 真删除项目 方便清理测试数据 临床试验项目Id @@ -13022,7 +13172,7 @@ 入组流程-CRO确定医生名单 [ Approve] - + 入组流程-后台确认医生入组[Confirm] @@ -13047,6 +13197,27 @@ + + + 用户多账号,初次维护数据 + + + + + + 项目用户 维护数据 + + + + + + + 外部人员 中心调研人员维护 + + + + + 维护临床数据 --一定要在同步表前同步数据才行 @@ -13238,7 +13409,7 @@ 加急的医学反馈任务 通知MIM - + 加急的医学反馈任务 通知MIM @@ -13256,7 +13427,7 @@ MIM 回复医学返回通知IR - + MIM 回复医学返回通知IR @@ -13273,7 +13444,7 @@ 加急阅片 IR 申请重阅 或者PM 申请重阅 - + 加急阅片 IR 申请重阅 或者PM 申请重阅 @@ -13283,7 +13454,7 @@ 用户提交 发送邮件 通知SPM 或者PM - + 用户提交 发送邮件 通知SPM 或者PM @@ -13293,7 +13464,7 @@ 调研表初审通过,进行复审发送邮件 - + 调研表初审通过,进行复审发送邮件 @@ -13303,7 +13474,7 @@ 调研表驳回发送邮件 之前已有,需要迁移过来 - + 调研表驳回发送邮件 之前已有,需要迁移过来 @@ -13313,7 +13484,7 @@ CRC 提交了 通知QC进行质控 Code005,006 - + CRC 提交了 通知QC进行质控 Code005,006 @@ -13323,7 +13494,7 @@ CRC 回复质控质疑 通知QC Code012,013 - + CRC 回复质控质疑 通知QC Code012,013 @@ -13333,7 +13504,7 @@ QC回复 质控质疑,通知CRC (014,015) - + QC回复 质控质疑,通知CRC (014,015) @@ -13343,19 +13514,19 @@ CRC 回复一致性核查质疑 通知PM (019,020) - + CRC 回复一致性核查质疑 通知PM (019,020) - + 通知PM 进行一致性核查 (018,030) - + 通知PM 进行一致性核查 (018,030) @@ -13365,7 +13536,7 @@ QC 领取了质控任务 (007,008) - + QC 领取了质控任务 (007,008) @@ -13376,22 +13547,22 @@ publish 请求流不会先到消费者,发布后,直接执行后续代码 - + - + meditor send 的时候,请求流会先到消费者,返回后才会执行后续代码 publish 请求流不会先到消费者,发布后,直接执行后续代码 - + QC 影像质疑 - + QC 影像质疑 @@ -13401,7 +13572,7 @@ CRC 影像质疑 - + CRC 影像质疑 @@ -13411,7 +13582,7 @@ 影像质控 发送给QC的 - + 影像质控 发送给QC的 @@ -13451,7 +13622,7 @@ 10分钟检测通知IR 已通知的进行标注,下次不会再通知 - + 10分钟检测通知IR 已通知的进行标注,下次不会再通知 @@ -13935,6 +14106,11 @@ 检查日期 + + + 表格问题标记 + + 基线未选择任何靶病灶 @@ -14909,7 +15085,7 @@ UserTypeRoleService - + UserTypeRoleService @@ -15143,11 +15319,6 @@ 组件一致性和原Arm2是否有差异 - - - 最终导出的病灶信息 - - QCChallengeId @@ -15342,7 +15513,7 @@ TrialSiteSurveyService - + TrialSiteSurveyService @@ -15382,6 +15553,45 @@ + + + 初始登陆界面 项目基本信息+下拉框数据 + + + + + + + 实际这里只会是更新 添加在login的时候做了 + + + + + + + 项目Site调研用户列表 所有site的调研用户 最新的调研表的记录的用户 new + + + + + + 获取 项目 site的调研记录 New + + + + + + 驳回 New + + + + + + 调研表废除 + + + + 验证后 如果数据库该项目不存在该邮箱 那么就插入记录 存在 @@ -15397,45 +15607,6 @@ - - - 实际这里只会是更新 添加在login的时候做了 - - - - - - - 删除调研表 - - - - - - - 获取 项目 site的调研记录 New - - - - - - 项目Site调研用户列表 所有site的调研用户 最新的调研表的记录的用户 new - - - - - - 初始登陆界面 项目基本信息+下拉框数据 - - - - - - - 驳回 New - - - 提交 后台自动识别是谁提交 @@ -15448,7 +15619,7 @@ TrialSiteUserSurveyService - + TrialSiteUserSurveyService @@ -15969,7 +16140,7 @@ SystemDocumentService - + SystemDocumentService @@ -15992,7 +16163,7 @@ TrialDocumentService - + TrialDocumentService @@ -16069,20 +16240,6 @@ - - - 从项目下参与者的维度 先看人员列表(展示统计数字) 点击数字 再看人员具体签署的 系统文档+项目文档(共用上面与人相关的具体文档列表) - - - - - - - 从 文档的维度 先看到文档列表(系统文档+项目文档 以及需要确认的人数 和已经确认人数) 点击数字查看某文档下面人确认情况 - - - - Financial---项目收入价格验证 @@ -16119,15 +16276,21 @@ 指定资源Id,渲染Dicom序列的Jpeg预览图像 Dicom序列的Id + + 获取某一Site下面的负责的CRC列表 + + + 批量添加Site下 CRC的负责人 + + + 删除CRC人员 + Pannel 进去 SiteTab [new] setting页面Site列表,和getSiteCRCList对比 没有统计数据,增加了一些site信息 - - 获取某一Site下面的负责的CRC列表 - [new] Setting页面 Site勾选列表( @@ -16141,12 +16304,6 @@ - - 批量添加Site下 CRC的负责人 - - - 删除CRC人员 - 获取项目下的 site 下拉框数据 CRC只看到他负责的 @@ -16970,6 +17127,32 @@ + + + 维护用户角色表中的账户信息 + + + + + + + 维护用户角色表中的账户信息 + + + + + + + 账户日志 记录账户每次操作的信息 + + + + + + 账户日志 记录账户每次操作的信息 + + + 因为可能先一致性核查通过,生成其他标准的任务了,新签名的标准也需要产生任务 @@ -17246,6 +17429,36 @@ 工作兼职En + + + 大学 + + + + + 大学 + + + + + 城市 + + + + + 城市 + + + + + 医院 + + + + + 医院 + + 银行卡号 @@ -17331,6 +17544,56 @@ 工作兼职En + + + 大学 + + + + + 大学 + + + + + 城市 + + + + + 城市 + + + + + 医院 + + + + + 医院 + + + + + 大学 + + + + + 大学 + + + + + 医院 + + + + + 医院 + + 文件名称 @@ -17466,11 +17729,6 @@ GCP机构 - - - LastLoginIP - - 上一次修改密码的时间 diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/ConsistencyCheckConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/ConsistencyCheckConsumer.cs index 0efce758d..afad75e47 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/ConsistencyCheckConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/ConsistencyCheckConsumer.cs @@ -191,7 +191,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer // dialogMsg.AppendLine(@$"
说明:为高效解决/处理以上全部质疑问题,麻烦您准确核实实际影像检查情况。请注意影像日期与实际检查的日期可能会不一致,部分检查(如PET -CT)可能同时存在多种模态影像。准确核实后,请回复该访视正确的影像检查情况。"); dbSV.CheckState = CheckStateEnum.CVPassed; - dbSV.CheckUserId = _userInfo.Id; + dbSV.CheckUserId = _userInfo.UserRoleId; dbSV.CheckPassedTime = DateTime.Now; dbSV.CheckChallengeState = CheckChanllengeTypeEnum.Closed; diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs index a547968f0..0f677dfa1 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs @@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer; /// 加急的医学反馈任务 通知MIM ///
public class UrgentMedicalReviewAddedEventConsumer( - IRepository _userRepository, + IRepository _userRoleRepository, IRepository _taskMedicalReviewRepository, IRepository _trialRepository, IRepository _subjectVisitRepository, @@ -58,7 +58,7 @@ public class UrgentMedicalReviewAddedEventConsumer( return; } var criterion = await _readingQuestionCriterionTrialRepository.FirstOrDefaultAsync(x => x.Id == medicalReview.VisitTask.TrialReadingCriterionId); - var userinfo = await _userRepository.Where(x => x.Id == medicalReview.MedicalManagerUserId).FirstOrDefaultAsync(); + var userinfo = await _userRoleRepository.Where(x => x.Id == medicalReview.MedicalManagerUserId).FirstOrDefaultAsync(); var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReview.VisitTaskId).Include(x=>x.SourceSubjectVisit).Include(x => x.ReadModule).Include(x => x.Subject).FirstNotNullAsync(); @@ -128,7 +128,7 @@ public class UrgentMedicalReviewAddedEventConsumer( //IR 回复医学反馈通知MIM public class UrgentIRRepliedMedicalReviewConsumer( - IRepository _userRepository, + IRepository _userRoleRepository, IRepository _taskMedicalReviewRepository, IRepository _trialRepository, IRepository _subjectVisitRepository, @@ -159,7 +159,7 @@ public class UrgentIRRepliedMedicalReviewConsumer( return; } var criterion = await _readingQuestionCriterionTrialRepository.FirstOrDefaultAsync(x => x.Id == medicalReview.VisitTask.TrialReadingCriterionId); - var userinfo = await _userRepository.Where(x => x.Id == medicalReview.MedicalManagerUserId).FirstOrDefaultAsync(); + var userinfo = await _userRoleRepository.Where(x => x.Id == medicalReview.MedicalManagerUserId).FirstOrDefaultAsync(); var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReview.VisitTaskId).Include(x => x.SourceSubjectVisit).Include(x => x.ReadModule).Include(x => x.Subject).FirstNotNullAsync(); @@ -231,7 +231,7 @@ public class UrgentIRRepliedMedicalReviewConsumer( /// MIM 回复医学返回通知IR ///
public class UrgentMIMRepliedMedicalReviewConsumer( - IRepository _userRepository, + IRepository _userRoleRepository, IRepository _taskMedicalReviewRepository, IRepository _trialRepository, IRepository _subjectVisitRepository, @@ -268,7 +268,7 @@ public class UrgentMIMRepliedMedicalReviewConsumer( var criterion = await _readingQuestionCriterionTrialRepository.FirstOrDefaultAsync(x => x.Id == medicalReview.VisitTask.TrialReadingCriterionId); var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReview.VisitTaskId).Include(x => x.SourceSubjectVisit).Include(x => x.ReadModule).Include(x => x.Subject).FirstNotNullAsync(); - var userinfo = await _userRepository.Where(x => x.Id == taskInfo.DoctorUserId).FirstOrDefaultAsync(); + var userinfo = await _userRoleRepository.Where(x => x.Id == taskInfo.DoctorUserId).FirstOrDefaultAsync(); @@ -346,8 +346,8 @@ public class UrgentMIMRepliedMedicalReviewConsumer( /// 加急阅片 IR 申请重阅 或者PM 申请重阅 ///
public class UrgentIRApplyedReReadingConsumer( - IRepository _userRepository, - IRepository _trialUseRepository, + IRepository _userRoleRepository, + IRepository _trialUseRoleRepository, IRepository _taskMedicalReviewRepository, IRepository _trialRepository, IRepository _subjectVisitRepository, @@ -370,9 +370,9 @@ public class UrgentIRApplyedReReadingConsumer( var criterion = await _readingQuestionCriterionTrialRepository.FirstOrDefaultAsync(x => x.Id == taskInfo.TrialReadingCriterionId); - var doctorInfo = await _userRepository.Where(x => x.Id == taskInfo.DoctorUserId).FirstOrDefaultAsync(); + var doctorInfo = await _userRoleRepository.Where(x => x.Id == taskInfo.DoctorUserId).FirstOrDefaultAsync(); - var trialUser = await _trialUseRepository.Where(x => x.TrialId == taskInfo.TrialId).Include(x => x.User).Select(x=>x.User).ToListAsync(); + var trialUser = await _trialUseRoleRepository.Where(x => x.TrialId == taskInfo.TrialId).Include(x => x.UserRole).Select(x=>x.UserRole).ToListAsync(); var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.ProjectManager||x.UserTypeEnum==UserTypeEnum.APM).ToList(); if (context.Message.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed) diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/SiteSurverEmailConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/SiteSurverEmailConsumer.cs index d1734d2e1..3072bc632 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/SiteSurverEmailConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/SiteSurverEmailConsumer.cs @@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer; public class UserSiteSurveySubmitedEventConsumer( IRepository _trialRepository, IRepository _trialSiteRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _trialSiteSurveyRepository, IRepository _emailNoticeConfigrepository, IOptionsMonitor systemEmailConfig @@ -47,9 +47,9 @@ public class UserSiteSurveySubmitedEventConsumer( var trialId = siteSurveyInfo.TrialId; - var trialUserList = await _trialUserRepository.Where(t => t.TrialId == siteSurveyInfo.TrialId) - .Where(t => t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM || t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM) - .Select(t => new { t.User.FullName, t.User.EMail, t.User.UserTypeEnum }).ToListAsync(); + var trialUserList = await _trialUserRoleRepository.Where(t => t.TrialId == siteSurveyInfo.TrialId) + .Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM || t.UserRole.UserTypeEnum == UserTypeEnum.ProjectManager || t.UserRole.UserTypeEnum == UserTypeEnum.APM) + .Select(t => new { t.UserRole.FullName, t.UserRole.IdentityUser.EMail, t.UserRole.UserTypeEnum }).ToListAsync(); var sPMOrCPMList = trialUserList.Where(t => t.UserTypeEnum == UserTypeEnum.SPM || t.UserTypeEnum == UserTypeEnum.CPM).ToList(); var pmAndAPMList = trialUserList.Where(t => t.UserTypeEnum == UserTypeEnum.ProjectManager || t.UserTypeEnum == UserTypeEnum.APM).ToList(); @@ -125,7 +125,7 @@ public class UserSiteSurveySubmitedEventConsumer( /// public class SiteSurveySPMSubmitedEventConsumer( IRepository _trialRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _trialSiteRepository, IRepository _trialSiteSurveyRepository, IRepository _emailNoticeConfigrepository, @@ -145,9 +145,9 @@ public class SiteSurveySPMSubmitedEventConsumer( var messageToSend = new MimeMessage(); - var trialUserList = _trialUserRepository.Where(t => t.TrialId == trialId) - .Where(t => t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM || t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM) - .Select(t => new { t.User.EMail, t.User.FullName, t.User.UserTypeEnum }).ToList(); + var trialUserList = _trialUserRoleRepository.Where(t => t.TrialId == trialId) + .Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM || t.UserRole.UserTypeEnum == UserTypeEnum.ProjectManager || t.UserRole.UserTypeEnum == UserTypeEnum.APM) + .Select(t => new { t.UserRole.IdentityUser.EMail, t.UserRole.FullName, t.UserRole.UserTypeEnum }).ToList(); var sPMOrCPMList = trialUserList.Where(t => t.UserTypeEnum == UserTypeEnum.SPM || t.UserTypeEnum == UserTypeEnum.CPM).ToList(); var pmAndAPMList = trialUserList.Where(t => t.UserTypeEnum == UserTypeEnum.ProjectManager || t.UserTypeEnum == UserTypeEnum.APM).ToList(); @@ -200,7 +200,7 @@ public class SiteSurveySPMSubmitedEventConsumer( /// 调研表驳回发送邮件 之前已有,需要迁移过来 /// public class SiteSurverRejectedEventConsumer( - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _trialRepository, IRepository _trialSiteRepository, IRepository _trialSiteSurveyRepository, @@ -229,13 +229,13 @@ public class SiteSurverRejectedEventConsumer( //PM 驳回到SPM if (siteSurveyInfo.State == TrialSiteSurveyEnum.CRCSubmitted) { - //var user = await _userRepository.FirstOrDefaultAsync(t => t.Id == siteSurveyInfo.PreliminaryUserId); + //var user = await _userRoleRepository.FirstOrDefaultAsync(t => t.Id == siteSurveyInfo.PreliminaryUserId); //name = user.FullName; - var sPMOrCPMList = _trialUserRepository.Where(t => t.TrialId == trialId) - .Where(t => t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM) - .Select(t => new { t.User.EMail, t.User.FullName, t.User.UserTypeEnum }).ToList(); + var sPMOrCPMList = _trialUserRoleRepository.Where(t => t.TrialId == trialId) + .Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM) + .Select(t => new { t.UserRole.IdentityUser.EMail, t.UserRole.FullName, t.UserRole.UserTypeEnum }).ToList(); foreach (var user in sPMOrCPMList) diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs index 22f58a5da..d3a64309c 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs @@ -23,8 +23,8 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer; /// CRC 提交了 通知QC进行质控 Code005,006 /// public class CRCSubmitedAndQCToAuditEventConsumer( - IRepository _userRepository, - IRepository _trialUseRepository, + IRepository _userRoleRepository, + IRepository _trialUseRoleRepository, IRepository _subjectVisitRepository, IRepository _trialRepository, IRepository _readingQuestionCriterionTrialRepository, @@ -43,7 +43,7 @@ public class CRCSubmitedAndQCToAuditEventConsumer( var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstOrDefaultAsync(); - var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync(); + var trialUser = await _trialUseRoleRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.UserRole).Select(x => x.UserRole).ToListAsync(); var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.IQC).ToList(); @@ -127,8 +127,8 @@ public class CRCSubmitedAndQCToAuditEventConsumer( /// CRC 回复质控质疑 通知QC Code012,013 /// public class CRCRepliedQCChallengeEventConsumer( - IRepository _userRepository, - IRepository _trialUseRepository, + IRepository _userRoleRepository, + IRepository _trialUseRoleRepository, IRepository _subjectVisitRepository, IRepository _trialRepository, IRepository _qCChallengeRepository, @@ -153,7 +153,7 @@ public class CRCRepliedQCChallengeEventConsumer( - var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync(); + var trialUser = await _trialUseRoleRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.UserRole).Select(x => x.UserRole).ToListAsync(); @@ -224,8 +224,8 @@ public class CRCRepliedQCChallengeEventConsumer( /// QC回复 质控质疑,通知CRC (014,015) /// public class QCRepliedQCChallengeEventConsumer( - IRepository _userRepository, - IRepository _trialUseRepository, + IRepository _userRoleRepository, + IRepository _trialUseRoleRepository, IRepository _subjectVisitRepository, IRepository _trialRepository, IRepository _qCChallengeRepository, @@ -259,7 +259,7 @@ public class QCRepliedQCChallengeEventConsumer( var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync(); - var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync(); + var trialUser = await _trialUseRoleRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.UserRole).Select(x => x.UserRole).ToListAsync(); var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).ToList(); @@ -333,8 +333,8 @@ public class QCRepliedQCChallengeEventConsumer( /// CRC 回复一致性核查质疑 通知PM (019,020) /// public class CRCRepliedCheckChallengeEventConsumer( - IRepository _userRepository, - IRepository _trialUseRepository, + IRepository _userRoleRepository, + IRepository _trialUseRoleRepository, IRepository _subjectVisitRepository, IRepository _trialRepository, IRepository _qCChallengeRepository, @@ -354,7 +354,7 @@ public class CRCRepliedCheckChallengeEventConsumer( var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync(); - var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync(); + var trialUser = await _trialUseRoleRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.UserRole).Select(x => x.UserRole).ToListAsync(); var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.APM || x.UserTypeEnum == UserTypeEnum.ProjectManager).ToList(); @@ -425,8 +425,8 @@ public class CRCRepliedCheckChallengeEventConsumer( /// public class PMRepliedCheckChallengeEventConsumer( - IRepository _userRepository, - IRepository _trialUseRepository, + IRepository _userRoleRepository, + IRepository _trialUseRoleRepository, IRepository _subjectVisitRepository, IRepository _trialRepository, IRepository _checkChallengeDialogRepository, @@ -446,7 +446,7 @@ public class PMRepliedCheckChallengeEventConsumer( var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.NoneDicomStudyList).Include(x => x.StudyList).Include(x => x.Subject).FirstNotNullAsync(); - var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync(); + var trialUser = await _trialUseRoleRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.UserRole).Select(x => x.UserRole).ToListAsync(); var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).ToList(); @@ -524,8 +524,8 @@ public class PMRepliedCheckChallengeEventConsumer( /// 通知PM 进行一致性核查 (018,030) /// public class CheckStateChangedToAuditEventConsumer( - IRepository _userRepository, - IRepository _trialUseRepository, + IRepository _userRoleRepository, + IRepository _trialUseRoleRepository, IRepository _subjectVisitRepository, IRepository _trialRepository, IRepository _qCChallengeRepository, @@ -544,7 +544,7 @@ public class CheckStateChangedToAuditEventConsumer( var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync(); - var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync(); + var trialUser = await _trialUseRoleRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.UserRole).Select(x => x.UserRole).ToListAsync(); var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.APM || x.UserTypeEnum == UserTypeEnum.ProjectManager).ToList(); @@ -612,8 +612,8 @@ public class CheckStateChangedToAuditEventConsumer( /// QC 领取了质控任务 (007,008) /// public class QCClaimTaskEventConsumer( - IRepository _userRepository, - IRepository _trialUseRepository, + IRepository _userRoleRepository, + IRepository _trialUseRoleRepository, IRepository _subjectVisitRepository, IRepository _trialRepository, IRepository _qCChallengeRepository, @@ -639,7 +639,7 @@ public class QCClaimTaskEventConsumer( - var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync(); + var trialUser = await _trialUseRoleRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.UserRole).Select(x => x.UserRole).ToListAsync(); diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/TestConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/TestConsumer.cs index d87654fbd..8dcc1c22a 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/TestConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/TestConsumer.cs @@ -30,13 +30,13 @@ public class MasstransiTestCommand /// publish 请求流不会先到消费者,发布后,直接执行后续代码 /// /// -/// -public class MasstransitTestConsumer(IRepository _userRepository) : IConsumer +/// +public class MasstransitTestConsumer(IRepository _userRoleRepository) : IConsumer { public async Task Consume(ConsumeContext context) { - Console.WriteLine(_userRepository._dbContext.GetHashCode()); + Console.WriteLine(_userRoleRepository._dbContext.GetHashCode()); Console.WriteLine("Now is " + DateTime.Now.ToString()); Console.WriteLine($"MassTransit.Consumer :{context.Message.value}"); diff --git a/IRaCIS.Core.Application/MassTransit/Recurring/IRRecurringConsumer.cs b/IRaCIS.Core.Application/MassTransit/Recurring/IRRecurringConsumer.cs index 53be5c597..ce9f3ce6b 100644 --- a/IRaCIS.Core.Application/MassTransit/Recurring/IRRecurringConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Recurring/IRRecurringConsumer.cs @@ -26,7 +26,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring IRepository _trialReadingCriterionRepository, IRepository _visitTaskRepository, IRepository _dictionaryRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _emailNoticeConfigrepository, IOptionsMonitor systemEmailConfig) : IConsumer { @@ -52,12 +52,12 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring Expression> comonTaskFilter = t => t.TrialId == trialId && t.TaskState == TaskState.Effect && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskAllocationState == TaskAllocationState.Allocated; - var trialUserList = _trialUserRepository.Where(t => t.TrialId == trialId).Select(t => new + var trialUserList = _trialUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialUser.JoinTime != null).Select(t => new { t.UserId, - t.User.FullName, - t.User.EMail, - t.User.UserName, + t.UserRole.FullName, + t.UserRole.IdentityUser.EMail, + t.UserRole.IdentityUser.UserName, t.Trial.TrialCode, t.Trial.ResearchProgramNo //TrialReadingCriterionList = t.Trial.TrialReadingCriterionList.Select(t => new { t.CriterionName, TrialReadingCriterionId = t.Id }).ToList() @@ -69,7 +69,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring var userId = trialUser.UserId; - var doctorCriterionList = await _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.TrialId == trialId && t.Trial.TrialUserList.Any(t => t.UserId == userId)) + var doctorCriterionList = await _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.TrialId == trialId && t.Trial.TrialUserRoleList.Any(t => t.UserId == userId)) .Select(c => new { diff --git a/IRaCIS.Core.Application/MassTransit/Recurring/OldRecurringEmailHelper.cs b/IRaCIS.Core.Application/MassTransit/Recurring/OldRecurringEmailHelper.cs index 1b0ebab21..99e12463a 100644 --- a/IRaCIS.Core.Application/MassTransit/Recurring/OldRecurringEmailHelper.cs +++ b/IRaCIS.Core.Application/MassTransit/Recurring/OldRecurringEmailHelper.cs @@ -22,9 +22,9 @@ public static class OldRecurringEmailHelper public static async Task SendTrialEmailAsync( IRepository _trialEmailNoticeConfigRepository, IRepository _trialRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _visitTaskRepository, - IRepository _trialSiteUserRepository, + IRepository _trialSiteUserRoleRepository, Guid trialId, EmailBusinessScenario businessScenario, Func topicAndHtmlFunc, @@ -59,7 +59,7 @@ public static class OldRecurringEmailHelper var allUserTypeEnumList = toUserTypeEnumList.Union(copyUserTypeEnumList).Distinct().ToList(); - var allUserList = await _trialUserRepository.Where(t => t.TrialId == trialId && allUserTypeEnumList.Contains(t.User.UserTypeEnum)).Select(t => new { t.UserId, t.User.EMail, t.User.FullName, t.User.UserTypeEnum }).ToListAsync(); + var allUserList = await _trialUserRoleRepository.Where(t => t.TrialId == trialId && allUserTypeEnumList.Contains(t.UserRole.UserTypeEnum)).Select(t => new { t.UserId, t.UserRole.IdentityUser.EMail, t.UserRole.FullName, t.UserRole.UserTypeEnum }).ToListAsync(); var toUserList = allUserList.Where(t => toUserTypeEnumList.Contains(t.UserTypeEnum)) @@ -72,7 +72,7 @@ public static class OldRecurringEmailHelper } if (trialSiteId != null && toUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA)) { - var curentSiteUserIdList = _trialSiteUserRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList(); + var curentSiteUserIdList = _trialSiteUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList(); toUserList = toUserList.Where(t => (t.UserTypeEnum != UserTypeEnum.CRA && t.UserTypeEnum != UserTypeEnum.ClinicalResearchCoordinator) || curentSiteUserIdList.Contains(t.UserId)).ToList(); } @@ -86,7 +86,7 @@ public static class OldRecurringEmailHelper if (trialSiteId != null && copyUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA)) { - var curentSiteUserIdList = _trialSiteUserRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList(); + var curentSiteUserIdList = _trialSiteUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList(); copyUserList = copyUserList.Where(t => (t.UserTypeEnum != UserTypeEnum.CRA && t.UserTypeEnum != UserTypeEnum.ClinicalResearchCoordinator) || curentSiteUserIdList.Contains(t.UserId)).ToList(); } diff --git a/IRaCIS.Core.Application/MassTransit/Recurring/QCRecurringEmailConsumer.cs b/IRaCIS.Core.Application/MassTransit/Recurring/QCRecurringEmailConsumer.cs index b073e7de4..84ee27d3a 100644 --- a/IRaCIS.Core.Application/MassTransit/Recurring/QCRecurringEmailConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Recurring/QCRecurringEmailConsumer.cs @@ -23,9 +23,9 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer; public class QCImageQuestionRecurringEventConsumer(IRepository _trialRepository, IRepository _trialEmailNoticeConfigRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _visitTaskRepository, - IRepository _trialSiteUserRepository, + IRepository _trialSiteUserRoleRepository, IOptionsMonitor _SystemEmailSendConfig) : IConsumer { public async Task Consume(ConsumeContext context) @@ -37,7 +37,7 @@ public class QCImageQuestionRecurringEventConsumer(IRepository _trialRepo var trialInfo = await _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.ResearchProgramNo, t.ExperimentName, t.TrialCode, t.TrialStatusStr }).FirstNotNullAsync(); //找到 该项目的CRC 用户Id - var userList = await _trialUserRepository.Where(t => t.TrialId == trialId).Where(t => t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Select(t => new { t.UserId, t.User.FullName }).ToListAsync(); + var userList = await _trialUserRoleRepository.Where(t => t.TrialId == trialId).Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Select(t => new { t.UserId, t.UserRole.FullName }).ToListAsync(); //判断是否任务可以领取 ,可以的话 发送邮件 @@ -73,9 +73,9 @@ public class QCImageQuestionRecurringEventConsumer(IRepository _trialRepo await OldRecurringEmailHelper.SendTrialEmailAsync( _trialEmailNoticeConfigRepository, _trialRepository, - _trialUserRepository, + _trialUserRoleRepository, _visitTaskRepository, - _trialSiteUserRepository, + _trialSiteUserRoleRepository, trialId, EmailBusinessScenario.QCToCRCImageQuestion, topicAndHtmlFunc); } } @@ -88,9 +88,9 @@ public class QCImageQuestionRecurringEventConsumer(IRepository _trialRepo /// public class CRCImageQuestionRecurringEventConsumer(IRepository _trialRepository, IRepository _trialEmailNoticeConfigRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _visitTaskRepository, - IRepository _trialSiteUserRepository, + IRepository _trialSiteUserRoleRepository, IOptionsMonitor _SystemEmailSendConfig) : IConsumer { public async Task Consume(ConsumeContext context) @@ -101,7 +101,7 @@ public class CRCImageQuestionRecurringEventConsumer(IRepository _trialRep var trialInfo = await _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.ResearchProgramNo, t.ExperimentName, t.TrialCode, t.TrialStatusStr, t.DeclarationTypeEnumList }).FirstNotNullAsync(); //找到 该项目的IQC 用户Id - var userList = await _trialUserRepository.Where(t => t.TrialId == trialId).Where(t => t.User.UserTypeEnum == UserTypeEnum.IQC).Select(t => new { t.UserId, t.User.FullName }).ToListAsync(); + var userList = await _trialUserRoleRepository.Where(t => t.TrialId == trialId).Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.IQC).Select(t => new { t.UserId, t.UserRole.FullName }).ToListAsync(); //判断是否任务可以领取 ,可以的话 发送邮件 @@ -141,9 +141,9 @@ public class CRCImageQuestionRecurringEventConsumer(IRepository _trialRep await OldRecurringEmailHelper.SendTrialEmailAsync(_trialEmailNoticeConfigRepository, _trialRepository, - _trialUserRepository, + _trialUserRoleRepository, _visitTaskRepository, - _trialSiteUserRepository, + _trialSiteUserRoleRepository, trialId, EmailBusinessScenario.CRCToQCQuestion, topicAndHtmlFunc); } } @@ -155,9 +155,9 @@ public class CRCImageQuestionRecurringEventConsumer(IRepository _trialRep /// public class ImageQCRecurringEventConsumer(IRepository _trialRepository, IRepository _trialEmailNoticeConfigRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _visitTaskRepository, - IRepository _trialSiteUserRepository, + IRepository _trialSiteUserRoleRepository, IOptionsMonitor _SystemEmailSendConfig) : IConsumer { public async Task Consume(ConsumeContext context) @@ -169,7 +169,7 @@ public class ImageQCRecurringEventConsumer(IRepository _trialRepository, var trialInfo = await _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.ResearchProgramNo, t.ExperimentName, t.TrialCode, t.TrialStatusStr }).FirstNotNullAsync(); //找到 该项目的IQC 用户Id - var userList = await _trialUserRepository.Where(t => t.TrialId == trialId).Where(t => t.User.UserTypeEnum == UserTypeEnum.IQC).Select(t => new { t.UserId, t.User.FullName }).ToListAsync(); + var userList = await _trialUserRoleRepository.Where(t => t.TrialId == trialId).Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.IQC).Select(t => new { t.UserId, t.UserRole.FullName }).ToListAsync(); //判断是否任务可以领取 ,可以的话 发送邮件 var userIdList = userList.Select(t => t.UserId).ToList(); @@ -209,9 +209,9 @@ public class ImageQCRecurringEventConsumer(IRepository _trialRepository, await OldRecurringEmailHelper.SendTrialEmailAsync( _trialEmailNoticeConfigRepository, _trialRepository, - _trialUserRepository, + _trialUserRoleRepository, _visitTaskRepository, - _trialSiteUserRepository, + _trialSiteUserRoleRepository, trialId, EmailBusinessScenario.QCTask, topicAndHtmlFunc); } } diff --git a/IRaCIS.Core.Application/Service/Allocation/Interface/IVisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/Interface/IVisitTaskService.cs index 6268fa18e..6f486bfc2 100644 --- a/IRaCIS.Core.Application/Service/Allocation/Interface/IVisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/Interface/IVisitTaskService.cs @@ -14,7 +14,7 @@ namespace IRaCIS.Core.Application.Service { Task ApplyReReading(ApplyReReadingCommand applyReReadingCommand); - Task ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService); + Task ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand); Task> GetSubjectReadingIQueryable(GetReadingIQueryableInDto inDto); } diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs index 4bc3a1580..06d71d365 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs @@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Service /// [ApiExplorerSettings(GroupName = "Trial")] public class TaskAllocationRuleService(IRepository _taskAllocationRuleRepository, - IRepository _userRepository, + IRepository _userRoleRepository, IRepository _enrollRepository, IRepository _readingQuestionCriterionTrialRepository, IRepository _subjectCanceDoctorRepository, @@ -124,15 +124,15 @@ namespace IRaCIS.Core.Application.Service public async Task> GetDoctorUserSelectList(Guid trialId, [FromServices] IRepository _enrollRepository) { var query = from enroll in _enrollRepository.Where(t => t.TrialId == trialId && t.EnrollStatus >= EnrollStatus.ConfirmIntoGroup) - join user in _userRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId + join user in _userRoleRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId select new TrialDoctorUserSelectView() { TrialId = enroll.TrialId, //ReadingType = enroll.Trial.ReadingType, DoctorUserId = user.Id, - FullName = user.FullName, - UserCode = user.UserCode, - UserName = user.UserName, + FullName = user.IdentityUser.FullName, + UserCode = user.IdentityUser.UserCode, + UserName = user.IdentityUser.UserName, UserTypeEnum = user.UserTypeRole.UserTypeEnum, ReadingCategoryList = enroll.EnrollReadingCategoryList.Select(t => t.ReadingCategory).ToList() @@ -151,14 +151,14 @@ namespace IRaCIS.Core.Application.Service .WhereIf(selectQuery.TrialReadingCriterionId != null && selectQuery.ReadingCategory == null, t => t.Enroll.EnrollReadingCategoryList.Any(t => t.TrialReadingCriterionId == selectQuery.TrialReadingCriterionId)) .WhereIf(selectQuery.TrialReadingCriterionId != null && selectQuery.ReadingCategory != null, t => t.Enroll.EnrollReadingCategoryList.Any(t => t.TrialReadingCriterionId == selectQuery.TrialReadingCriterionId && t.ReadingCategory == selectQuery.ReadingCategory)) - join user in _userRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id + join user in _userRoleRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id select new TrialDoctorUserSelectView() { TrialId = allocationRule.TrialId, DoctorUserId = user.Id, - FullName = user.FullName, - UserCode = user.UserCode, - UserName = user.UserName, + FullName = user.IdentityUser.FullName, + UserCode = user.IdentityUser.UserCode, + UserName = user.IdentityUser.UserName, UserTypeEnum = user.UserTypeRole.UserTypeEnum, ReadingCategoryList = selectQuery.TrialReadingCriterionId == null ? diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index c45ec466e..6f601b8bd 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Service IRepository _trialRepository, IRepository _trialSiteRepository, IRepository _enrollRepository, - IRepository _userRepository, + IRepository _userRoleRepository, IRepository _trialVirtualSiteCodeUpdateRepository, IVisitTaskHelpeService _visitTaskCommonService, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITaskConsistentRuleService { @@ -369,7 +369,7 @@ namespace IRaCIS.Core.Application.Service var doctorUserIdQuery = from enroll in _enrollRepository.Where(t => t.TrialId == trialId).Where(t => t.EnrollReadingCategoryList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(c => c.ReadingCategory == ReadingCategory.Global || c.ReadingCategory == ReadingCategory.Visit)) .Where(t => t.EnrollReadingCriteriaList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsJoinAnalysis == true)) - join user in _userRepository.Where() on enroll.DoctorId equals user.DoctorId + join user in _userRoleRepository.Where() on enroll.DoctorId equals user.DoctorId select user.Id; var configDoctorUserIdList = await doctorUserIdQuery.ToListAsync(); @@ -707,9 +707,9 @@ namespace IRaCIS.Core.Application.Service DoctorUserList = t.SubjectDoctorList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsConfirmed && t.ArmEnum <= Arm.DoubleReadingArm2).Select(t => new UserSimpleInfo() { UserId = t.Id, - FullName = t.DoctorUser.FullName, - UserCode = t.DoctorUser.UserCode, - UserName = t.DoctorUser.UserName + FullName = t.DoctorUser.IdentityUser.FullName, + UserCode = t.DoctorUser.IdentityUser.UserCode, + UserName = t.DoctorUser.IdentityUser.UserName }).ToList(), ValidVisitCount = t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).GroupBy(t => new { t.SubjectId, t.VisitTaskNum }).Where(g => g.Count() == 2).Count(), @@ -784,7 +784,7 @@ namespace IRaCIS.Core.Application.Service var taskConsistentRuleQueryable = from enroll in _enrollRepository.Where(t => t.TrialId == trialId && t.EnrollStatus == EnrollStatus.ConfirmIntoGroup && t.EnrollReadingCriteriaList.Any(c => c.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && c.IsJoinAnalysis)) - join user in _userRepository.Where() on enroll.DoctorUserId equals user.Id + join user in _userRoleRepository.Where() on enroll.DoctorUserId equals user.Id join taskConsistentRule in _taskConsistentRuleRepository.Where(t => t.TrialId == trialId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.IsSelfAnalysis) on enroll.TrialId equals taskConsistentRule.TrialId select new TaskConsistentRuleView() { @@ -830,9 +830,9 @@ namespace IRaCIS.Core.Application.Service AnalysisDoctorUser = new UserSimpleInfo() { UserId = user.Id, - UserCode = user.UserCode, - FullName = user.FullName, - UserName = user.UserName + UserCode = user.IdentityUser.UserCode, + FullName = user.IdentityUser.FullName, + UserName = user.IdentityUser.UserName } }; diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewRuleService.cs index 8a16da499..bee0e2e7e 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewRuleService.cs @@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.Service /// [ApiExplorerSettings(GroupName = "Trial")] public class TaskMedicalReviewRuleService(IRepository _taskMedicalReviewRuleRepository, - IRepository _trialUserRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITaskMedicalReviewRuleService + IRepository _trialUserRoleRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITaskMedicalReviewRuleService { @@ -29,7 +29,7 @@ namespace IRaCIS.Core.Application.Service var taskTaskMedicalReviewRuleQueryable = _taskMedicalReviewRuleRepository.Where(t => t.TrialId == inQuery.TrialId) .ProjectTo(_mapper.ConfigurationProvider); - var isHaveMIM = await _trialUserRepository.AnyAsync(t => t.User.UserTypeEnum == Domain.Share.UserTypeEnum.MIM && t.TrialId == inQuery.TrialId); + var isHaveMIM = await _trialUserRoleRepository.AnyAsync(t => t.UserRole.UserTypeEnum == Domain.Share.UserTypeEnum.MIM && t.TrialId == inQuery.TrialId); return (await taskTaskMedicalReviewRuleQueryable.ToListAsync(), new { IsHaveMIM = isHaveMIM }); } diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs index 52f75d25a..2a8acf366 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs @@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Service /// [ApiExplorerSettings(GroupName = "Trial")] public class TaskMedicalReviewService(IRepository _taskMedicalReviewRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _readingQuestionCriterionTrialRepository, IRepository _visitTaskRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITaskMedicalReviewService { @@ -196,7 +196,7 @@ namespace IRaCIS.Core.Application.Service public async Task>> GetMIMMedicalReviewTaskList(TaskMedicalReviewQuery inQuery) { - var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.Id && t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId) + var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.UserRoleId && t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId) .WhereIf(inQuery.IsGetNextMedicalReviewTask, x => ( @@ -328,7 +328,7 @@ namespace IRaCIS.Core.Application.Service [HttpGet("{trialId:guid}")] public async Task> GetMIMUserList(Guid trialId) { - var query = _trialUserRepository.Where(t => (t.User.UserTypeEnum == Domain.Share.UserTypeEnum.MIM || t.User.UserTypeEnum == Domain.Share.UserTypeEnum.MC) && t.TrialId == trialId).Select(t => t.User).ProjectTo(_mapper.ConfigurationProvider); + var query = _trialUserRoleRepository.Where(t => (t.UserRole.UserTypeEnum == Domain.Share.UserTypeEnum.MIM || t.UserRole.UserTypeEnum == Domain.Share.UserTypeEnum.MC) && t.TrialId == trialId).Select(t => t.UserRole).ProjectTo(_mapper.ConfigurationProvider); return await query.ToListAsync(); } diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 88cda7c9e..8ea91ec93 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -8,6 +8,7 @@ using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Application.ViewModel; +using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Domain.Share.Reading; using IRaCIS.Core.Infra.EFCore.Common; @@ -48,6 +49,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, IRepository _taskInfluenceRepository, IRepository _trialQCQuestionAnswerRepository, ILogger _logger, + IVisitTaskHelpeService _visitTaskCommonService, IRepository _subjectCriteriaEvaluationVisitStudyFilterRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IVisitTaskService { @@ -841,7 +843,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, var visitTaskQueryable = _visitTaskReReadingRepository .Where(t => t.RequestReReadingType == RequestReReadingType.DocotorApply) - .Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.Id) + .Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.UserRoleId) .Where(t => t.OriginalReReadingTask.TrialId == inQuery.TrialId) .WhereIf(inQuery.RequestReReadingResultEnum != null, t => t.RequestReReadingResultEnum == inQuery.RequestReReadingResultEnum) .WhereIf(inQuery.RootReReadingTaskId != null, t => t.RootReReadingTaskId == inQuery.RootReReadingTaskId || t.OriginalReReadingTaskId == inQuery.RootReReadingTaskId) @@ -959,7 +961,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, //随机阅片 else { - var taskQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId) + var taskQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.UserRoleId && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId) .Where(x => !x.Subject.IsDeleted).Where(x => (x.IsNeedClinicalDataSign && x.IsClinicalDataSign) || !x.IsNeedClinicalDataSign); iRUnReadOut = new IRUnReadOutDto() @@ -1003,7 +1005,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, if (critrion.IsReadingTaskViewInOrder == ReadingOrder.InOrder) { - var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect) + var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.UserRoleId && x.TaskState == TaskState.Effect) .WhereIf(inQuery.SubjectId != null, x => x.SubjectId == inQuery.SubjectId) //前序 不存在 未生成任务的访视 @@ -1124,19 +1126,19 @@ public class VisitTaskService(IRepository _visitTaskRepository, if (subjectId != null) { //找到 非一致性分析,未签名,状态正常的 并且任务名称是TimePoint的 任务 - var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id + var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskBlindName == "Timepoint" && t.ReadingCategory == ReadingCategory.Visit && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze), true).ToListAsync(); if (needDealTaskList.Count > 0) { //已完成的访视任务数量(包含重阅的) - var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id + var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit); //已经处理过的任务名称的数量 - var haveDealedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id + var haveDealedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit && t.TaskBlindName != "Timepoint"); @@ -1156,7 +1158,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, } } - var visitQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect) + var visitQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.UserRoleId && x.TaskState == TaskState.Effect) .WhereIf(inQuery.SubjectId != null, x => x.SubjectId == inQuery.SubjectId) .WhereIf(!string.IsNullOrEmpty(subjectCode), t => (t.Subject.Code.Contains(subjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(subjectCode!) && t.IsAnalysisCreate)); @@ -1219,7 +1221,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId) - .Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据 + .Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据 .WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId) @@ -1249,12 +1251,12 @@ public class VisitTaskService(IRepository _visitTaskRepository, [HttpPost] [UnitOfWork] - public async Task AIRReReading(AIRReReadingCommand command, [FromServices] IVisitTaskHelpeService _visitTaskCommonService) + public async Task AIRReReading(AIRReReadingCommand command) { - var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id + var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.SourceSubjectVisit.IsBaseLine == true).ToListAsync(); - var judegeList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id + var judegeList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned).ToListAsync(); foreach (var item in judegeList) @@ -1282,7 +1284,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, - var requestRecordList = await _visitTaskReReadingRepository.Where(t => baseLineTaskIdList.Contains(t.OriginalReReadingTaskId) && t.RequestReReadingUserId == _userInfo.Id && t.RequestReReadingReason == "AIR自动重阅基线").ToListAsync(); + var requestRecordList = await _visitTaskReReadingRepository.Where(t => baseLineTaskIdList.Contains(t.OriginalReReadingTaskId) && t.RequestReReadingUserId == _userInfo.UserRoleId && t.RequestReReadingReason == "AIR自动重阅基线").ToListAsync(); if (requestRecordList.Count != baseLineTaskIdList.Count) { @@ -1294,9 +1296,8 @@ public class VisitTaskService(IRepository _visitTaskRepository, { TrialId = command.TrialId, RequestReReadingResultEnum = RequestReReadingResult.Agree, - //ConfirmReReadingList = new List() { new ConfirmReReadingDTO() { Id = requestRecord.Id, OriginalReReadingTaskId = task.Id } } ConfirmReReadingList = requestRecordList.Select(t => new ConfirmReReadingDTO() { Id = t.Id, OriginalReReadingTaskId = t.OriginalReReadingTaskId }).ToList() - }, _visitTaskCommonService); + }); return ResponseOutput.Ok(); @@ -1315,7 +1316,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, public async Task ApplyReReading(ApplyReReadingCommand applyReReadingCommand) { - + var trialId = applyReReadingCommand.TrialId; var taskList = await _visitTaskRepository.Where(t => applyReReadingCommand.TaskIdList.Contains(t.Id), true).ToListAsync(); @@ -1324,6 +1325,16 @@ public class VisitTaskService(IRepository _visitTaskRepository, var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == trialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsAutoCreate, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync()).IfNullThrowException(); + var isSPMJoinReReadingApproval = _trialRepository.Any(t => t.Id == trialId && t.IsSPMJoinReReadingApproval); + + var hasSPMOrCPM = await _trialRepository.Where(t => t.Id == trialId).SelectMany(t => t.TrialIdentityUserList).AnyAsync(t => t.TrialUserRoleList.Any(t => + t.UserRole.IdentityUser.Status == UserStateEnum.Enable + && t.UserRole.IsUserRoleDisabled == false + && (t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM) + )); + + var isSPMjoin = isSPMJoinReReadingApproval && hasSPMOrCPM; + foreach (var task in taskList) { @@ -1383,7 +1394,8 @@ public class VisitTaskService(IRepository _visitTaskRepository, } - if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer) + + else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer) { task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed; @@ -1478,58 +1490,54 @@ public class VisitTaskService(IRepository _visitTaskRepository, } //AIR 不加验证 - if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR) + else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR) { task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed; } - - var rootReReadingTaskId = _visitTaskReReadingRepository.Where(t => t.NewReReadingTaskId == task.Id).Select(u => u.RootReReadingTaskId).FirstOrDefault(); - - //添加申请记录 - var visitTaskReReading = await _visitTaskReReadingRepository.AddAsync(new VisitTaskReReading() + //pm 申请重阅,并且SPM不参与,那么不增加申请记录,直接退回 + if (!isSPMjoin && IsPMOrAPm()) { - TrialId = applyReReadingCommand.TrialId, - RootReReadingTaskId = rootReReadingTaskId == Guid.Empty ? task.Id : rootReReadingTaskId, - OriginalReReadingTaskId = task.Id, - RequestReReadingTime = DateTime.Now, - RequestReReadingUserId = _userInfo.Id, - IsCopyOrigenalForms = applyReReadingCommand.IsCopyOrigenalForms, - IsCopyFollowForms = applyReReadingCommand.IsCopyFollowForms, - RequestReReadingReason = applyReReadingCommand.RequestReReadingReason, - RequestReReadingType = applyReReadingCommand.RequestReReadingType, + //不想看到申请记录 + foreach (var item in applyReReadingCommand.TaskIdList) + { + await AgreeReReading(item, RequestReReadingType.TrialGroupApply, null); + } + + } + else + { + var rootReReadingTaskId = _visitTaskReReadingRepository.Where(t => t.NewReReadingTaskId == task.Id).Select(u => u.RootReReadingTaskId).FirstOrDefault(); + + //添加申请记录 + var visitTaskReReading = await _visitTaskReReadingRepository.AddAsync(new VisitTaskReReading() + { + TrialId = applyReReadingCommand.TrialId, + RootReReadingTaskId = rootReReadingTaskId == Guid.Empty ? task.Id : rootReReadingTaskId, + OriginalReReadingTaskId = task.Id, + RequestReReadingTime = DateTime.Now, + RequestReReadingUserId = _userInfo.UserRoleId, + IsCopyOrigenalForms = applyReReadingCommand.IsCopyOrigenalForms, + IsCopyFollowForms = applyReReadingCommand.IsCopyFollowForms, + RequestReReadingReason = applyReReadingCommand.RequestReReadingReason, + RequestReReadingType = applyReReadingCommand.RequestReReadingType, + + }); + } + - }); } await _visitTaskRepository.SaveChangesAsync(); + return ResponseOutput.Ok(); } - /// - /// 重阅原任务跟踪处理 - /// - /// - /// - /// - private void ReReadingTaskTrackingDeal(VisitTask origenalTask, ConfirmReReadingCommand agreeReReadingCommand) - { - if (origenalTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || origenalTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed) - { - origenalTask.ReReadingApplyState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? ReReadingApplyState.Agree : ReReadingApplyState.Reject; - origenalTask.TaskState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? TaskState.HaveReturned : origenalTask.TaskState; - } - else - { - //---当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面 - throw new BusinessValidationFailedException(_localizer["VisitTask_InvalidReapplyStatus"]); - } - } private async Task SetMedicalReviewInvalidAsync(List influenceTaskList, bool isPMApply = true) { @@ -1579,13 +1587,12 @@ public class VisitTaskService(IRepository _visitTaskRepository, /// 确认重阅与否 1同意 2 拒绝 /// /// - /// /// [HttpPost] [UnitOfWork] [TrialGlobalLimit("AfterStopCannNotOpt")] - public async Task ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService) + public async Task ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand) { var trialId = agreeReReadingCommand.TrialId; @@ -1598,527 +1605,42 @@ public class VisitTaskService(IRepository _visitTaskRepository, if ((origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze)) { - await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.Id, RequestReReadingResultEnum = RequestReReadingResult.Invalid }); + await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.UserRoleId, RequestReReadingResultEnum = RequestReReadingResult.Invalid }); //---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作 - return ResponseOutput.Ok(string.Empty, msg: _localizer["VisitTask_ReapplyStatusConflict"]); + throw new BusinessValidationFailedException(_localizer["VisitTask_ReapplyStatusConflict"]); } - - var criterionConfig = await _trialReadingCriterionRepository.Where(x => x.Id == origenalTask.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAdditionalAssessment, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync(); - //更新申请信息 var visitTaskReReadingAppply = await _visitTaskReReadingRepository.FirstOrDefaultAsync(t => t.Id == item.Id); - visitTaskReReadingAppply.RequestReReadingConfirmUserId = _userInfo.Id; + visitTaskReReadingAppply.RequestReReadingConfirmUserId = _userInfo.UserRoleId; visitTaskReReadingAppply.RequestReReadingResultEnum = agreeReReadingCommand.RequestReReadingResultEnum; visitTaskReReadingAppply.RequestReReadingRejectReason = agreeReReadingCommand.RequestReReadingRejectReason; - Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.TaskAllocationState == TaskAllocationState.Allocated; - - //是否是一致性分析任务 正常申请 会影响一致性分析任务 - filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate); - - //IR 申请1.1 基线重阅,影响附加评估两个IR所有的任务 - var isIR1Point1AdditionalAssessmentBaseline = false; - - //附加评估 IR 和PM 看到的影响列表不一样 - - //1.1 有附加评估,会影响其他标准的任务 - if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment) - { - // PM申请 SPM / CPM审批 - if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (IsSpmOrCPM())) - { - filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB); - } - //IR 申请 PM审批 - else - { - - // 1.1 基线任务影响BM任务 - if ((IsPMOrAPm()) && _subjectVisitRepository.Any(t => t.Id == origenalTask.SourceSubjectVisitId && t.IsBaseLine == true)) - { - - isIR1Point1AdditionalAssessmentBaseline = true; - - } - // 1.1 非基线任务不影响BM任务 - else - { - filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId); - } - } - } - else - { - //默认影响的都是该标准的任务 - filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId); - } if (agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree) { - //PM申请 SPM / CPM审批 回退访视,因此这里不生成访视任务 影响多个标准的任务 - if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (IsSpmOrCPM())) + + await AgreeReReading(origenalTask.Id, visitTaskReReadingAppply.RequestReReadingType, visitTaskReReadingAppply); + + //找到跟踪的实体 + var influenceTask = await _visitTaskRepository.FindAsync(origenalTask.Id); + + if (origenalTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || origenalTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed) { - - // 不管有序 无序 都会 回退访视 - if (origenalTask.ReadingCategory == ReadingCategory.Visit) - { - //执行类似一致性核查回退流程 - await VisitBackAsync(origenalTask.SourceSubjectVisitId); - - } - else - { - //---仅允许同意访视类型的任务重阅 - throw new BusinessValidationFailedException(_localizer["VisitTask_ReReadTaskNotApplied"]); - } - - //有序阅片 - if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder) - { - - - //访视影响当前以及当前之后的 两个阅片人的 - filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum); - - - #region 影响的任务 - - - - var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); - - var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault(); - - foreach (var influenceTask in influenceTaskList) - { - //处理申请的任务 - if (influenceTask.Id == origenalTask.Id) - { - ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand); - - await InfluenceAddtioncalEvaluationCritrionAsync(origenalTask, influenceTaskList.Where(t => t.Id != origenalTask.Id).Where(t => t.SourceSubjectVisitId != null).Select(t => t.SourceSubjectVisitId!.Value).Distinct().ToList()); - - await PMReReadingConfirmOrBackInfluenceAnalysisAsync(origenalTask.SubjectId); - - await SetMedicalReviewInvalidAsync(influenceTaskList); - - } - - - if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) - { - influenceTask.TaskState = TaskState.HaveReturned; - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); - } - else - { - influenceTask.TaskState = TaskState.Adbandon; - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon }); - } - - - } - #endregion - } - //无序阅片 没有 全局 肿瘤学 - else - { - - // 1.当前任务及裁判任务 - // 2.影响所有阅片人的任务 - - var judegTaskNum = origenalTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Judge]; - - filterExpression = filterExpression.And(t => t.VisitTaskNum == origenalTask.VisitTaskNum || t.VisitTaskNum == judegTaskNum); - - - var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); - - //影像列表为空就为null - var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault(); - - foreach (var influenceTask in influenceTaskList) - { - //处理申请的任务 - if (influenceTask.Id == origenalTask.Id) - { - ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand); - - - await PMReReadingConfirmOrBackInfluenceAnalysisAsync(origenalTask.SubjectId); - - await SetMedicalReviewInvalidAsync(influenceTaskList); - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); - } - else - { - if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) - { - influenceTask.TaskState = TaskState.HaveReturned; - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); - } - else - { - influenceTask.TaskState = TaskState.Adbandon; - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon }); - } - } - } - - } - - - - } - //IR申请 PM 审批 注意这里有一致性分析的申请同意 不会回退访视,在此要生成影响的访视任务 - else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && (IsPMOrAPm() || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR)) - { - - - - //有序阅片 - if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder) - { - #region 有序 IR 申请 重阅 影响的其他访视查询 - - - - switch (origenalTask.ReadingCategory) - { - case ReadingCategory.Visit: - //影响后续访视已经读完的,正在读的,未读的不做处理 以及其他类型任务 - - //申请的是转化的,那么影响列表要排除转化之前的 - if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && origenalTask.BeforeConvertedTaskId != null) - { - - - filterExpression = filterExpression.And(t => (t.VisitTaskNum > origenalTask.VisitTaskNum && - ( - ((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId) - // 裁判 肿瘤学是另外的医生做 - || t.ReadingCategory == ReadingCategory.Judge - || t.ReadingCategory == ReadingCategory.Oncology - )) || t.Id == origenalTask.Id) - ; - } - else if (isIR1Point1AdditionalAssessmentBaseline) - { - filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum && - ((( - ((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId) - // 裁判 肿瘤学是另外的医生做 - || t.ReadingCategory == ReadingCategory.Judge - || t.ReadingCategory == ReadingCategory.Oncology - ) && t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId) || (t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB)) - ); - } - else - { - filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum && - ( - ((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId) - // 裁判 肿瘤学是另外的医生做 - || t.ReadingCategory == ReadingCategory.Judge - || t.ReadingCategory == ReadingCategory.Oncology - ) - ); - } - - - - - - - break; - - - //不影响后续访视: (t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState != ReadingTaskState.WaitReading) || - case ReadingCategory.Global: - - filterExpression = filterExpression.And(t => t.VisitTaskNum > origenalTask.VisitTaskNum && - ((t.DoctorUserId == origenalTask.DoctorUserId && t.ReadingCategory == ReadingCategory.Global) - || (t.ReadingCategory == ReadingCategory.Oncology) || (t.ReadingCategory == ReadingCategory.Judge)) || t.Id == origenalTask.Id); - break; - - case ReadingCategory.Oncology: - - //仅仅影响自己 后续任务如果是访视任务、全局任务或裁判任务,均不处理 - filterExpression = filterExpression.And(t => t.Id == origenalTask.Id); - break; - - case ReadingCategory.Judge: - - //裁判的影响自己 和后续肿瘤学阅片(不是自己做的) - filterExpression = filterExpression.And(t => t.Id == origenalTask.Id || t.VisitTaskNum > origenalTask.VisitTaskNum && t.ReadingCategory == ReadingCategory.Oncology); - - break; - - - default: - //---不支持重阅的任务类型 - throw new BusinessValidationFailedException(_localizer["VisitTask_UnsupportedTaskType"]); - - } - - #endregion - - - - var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).OrderBy(t => t.VisitTaskNum).ToListAsync(); - - var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault(); - - - - foreach (var influenceTask in influenceTaskList) - { - var beforeTaskState = influenceTask.TaskState; - - //已签名的任务 设置转变后的标志 - if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) - { - var isConvertedTask = _visitTaskRepository.Where(t => t.Id == influenceTask.Id).Select(t => t.IsConvertedTask).FirstOrDefault(); - - if (isConvertedTask) - { - influenceTask.IsHistoryConvertedTask = true; - } - } - - - //处理申请的任务 - if (influenceTask.Id == origenalTask.Id) - { - ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand); - - - await SetMedicalReviewInvalidAsync(influenceTaskList, false); - - await InfluenceAddtioncalEvaluationCritrionAsync(origenalTask, influenceTaskList.Where(t => t.Id != origenalTask.Id).Where(t => t.SourceSubjectVisitId != null).Select(t => t.SourceSubjectVisitId!.Value).Distinct().ToList(), false); - - } - - - - if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) - { - influenceTask.TaskState = TaskState.HaveReturned; - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); - } - else - { - influenceTask.TaskState = TaskState.Adbandon; - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon }); - } - - - #region 受影响的任务生成 - - // 影响的任务 仅仅访视类别的才生成 或者就是IR 申请的任务 - if (influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id) - { - - - // 影响的其他标准的附加评估的任务不立即生成 比如1.1基线 重阅 PM 同意仅仅生成1.1任务,不生成BM任务 - if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment && influenceTask.TrialReadingCriterionId != origenalTask.TrialReadingCriterionId) - { - //BM标准的不生成任务 - continue; - } - - - // i1.1标准 当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成 - if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1) - { - //申请的任务是冻结的任务(该任务发生转变) 影响自己 以及转变后的 以及后续任务 但是生成的时候,仅仅生成转变之前的 - //申请的是转变之后的任务 (转变生成的任务) 影响自己以及后续任务 生成转变后的任务 - if (influenceTask.BeforeConvertedTaskId != null && influenceTaskList.Any(t => t.Id == influenceTask.BeforeConvertedTaskId)) - { - //有转化的任务 和转化之前的任务时,转化后的任务时不生成的 - continue; - - } - - - } - - - await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand() - { - TrialId = trialId, - - ReadingCategory = GenerateTaskCategory.ReReading, - - ReReadingTask = influenceTask, - - //同步才可以 - Action = (newTask) => - { - //申请表 设置新任务Id - visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id; - - //生成的任务分配给原始医生 - newTask.DoctorUserId = origenalTask.DoctorUserId; - newTask.TaskAllocationState = TaskAllocationState.Allocated; - newTask.AllocateTime = DateTime.Now; - newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget); - - //拷贝原始表单 - if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id == origenalTask.Id) - { - if (origenalTask.ReadingCategory == ReadingCategory.Visit) - { - CopyForms(newTask, origenalTask); - - } - - } - - //拷贝后续表单 - if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum) - { - if (origenalTask.ReadingCategory == ReadingCategory.Visit) - { - CopyForms(newTask, origenalTask); - } - - - } - - } - }); - - - - #endregion - - - } - - } - - - - } - //无序阅片 IR只会申请访视类型和裁判类型的任务 注意这里有一致性分析的申请同意 - else - { - - - //1.当前任务及裁判任务 - //2.影响当前阅片人的任务 - filterExpression = filterExpression.And(t => t.Id == origenalTask.Id || t.Id == origenalTask.JudgeVisitTaskId); - - - var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); - - var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault(); - - foreach (var influenceTask in influenceTaskList) - { - //申请原任务处理 - if (influenceTask.Id == origenalTask.Id) - { - ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand); - - await SetMedicalReviewInvalidAsync(influenceTaskList, false); - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); - } - else - { - if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) - { - influenceTask.TaskState = TaskState.HaveReturned; - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); - } - else - { - influenceTask.TaskState = TaskState.Adbandon; - - trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon }); - } - } - - #region 受影响任务的生成 - - if (influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id) - { - await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand() - { - TrialId = trialId, - - ReadingCategory = GenerateTaskCategory.ReReading, - - ReReadingTask = origenalTask, - - //同步才可以 - Action = (newTask) => - { - //申请表 设置新任务Id - visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id; - - ////生成的任务分配给原始医生 - newTask.DoctorUserId = origenalTask.DoctorUserId; - newTask.TaskAllocationState = TaskAllocationState.Allocated; - newTask.AllocateTime = DateTime.Now; - newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget); - - - //裁判任务 需要进行特殊处理 在重阅逻辑里面处理 - - - if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id == origenalTask.Id) - { - if (origenalTask.ReadingCategory == ReadingCategory.Visit) - { - CopyForms(newTask, origenalTask); - - } - - } - - //拷贝后续表单 - if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum) - { - if (origenalTask.ReadingCategory == ReadingCategory.Visit) - { - CopyForms(newTask, origenalTask); - - } - } - - - } - }); - - } - #endregion - - } - - } - + influenceTask.ReReadingApplyState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? ReReadingApplyState.Agree : ReReadingApplyState.Reject; + influenceTask.TaskState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? TaskState.HaveReturned : origenalTask.TaskState; } else { - //---不符合 PM申请 SPM / CPM审批 | IR申请 PM 审批 - throw new BusinessValidationFailedException(_localizer["VisitTask_ReReadTaskAlreadyAffected"]); + //---当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面 + throw new BusinessValidationFailedException(_localizer["VisitTask_InvalidReapplyStatus"]); } + + } else if (agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Reject) { @@ -2151,6 +1673,523 @@ public class VisitTaskService(IRepository _visitTaskRepository, return ResponseOutput.Ok(); } + private async Task AgreeReReading(Guid visiTaskId, RequestReReadingType requestReReadingType, VisitTaskReReading? visitTaskReReadingAppply = null) + { + + + var origenalTask = (await _visitTaskRepository.Where(t => t.Id == visiTaskId).FirstOrDefaultAsync()).IfNullThrowException(); + var trialId = origenalTask.TrialId; + + + var criterionConfig = await _trialReadingCriterionRepository.Where(x => x.Id == origenalTask.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAdditionalAssessment, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync(); + + + Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) /*&& t.TaskAllocationState == TaskAllocationState.Allocated*/; + + //是否是一致性分析任务 正常申请 会影响一致性分析任务 + filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate); + + //IR 申请1.1 基线重阅,影响附加评估两个IR所有的任务 + var isIR1Point1AdditionalAssessmentBaseline = false; + + //附加评估 IR 和PM 看到的影响列表不一样 + + //1.1 有附加评估,会影响其他标准的任务 + if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment) + { + // PM申请 SPM / CPM审批 + if (requestReReadingType == RequestReReadingType.TrialGroupApply) + { + filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB); + } + //IR 申请 PM审批 + else + { + + // 1.1 基线任务影响BM任务 + if ((IsPMOrAPm()) && _subjectVisitRepository.Any(t => t.Id == origenalTask.SourceSubjectVisitId && t.IsBaseLine == true)) + { + + isIR1Point1AdditionalAssessmentBaseline = true; + + } + // 1.1 非基线任务不影响BM任务 + else + { + filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId); + } + } + } + else + { + //默认影响的都是该标准的任务 + filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId); + } + + //PM申请 SPM / CPM审批 回退访视,因此这里不生成访视任务 影响多个标准的任务 + if (requestReReadingType == RequestReReadingType.TrialGroupApply) + { + + // 不管有序 无序 都会 回退访视 + if (origenalTask.ReadingCategory == ReadingCategory.Visit) + { + //执行类似一致性核查回退流程 + await VisitBackAsync(origenalTask.SourceSubjectVisitId); + + } + else + { + //---仅允许同意访视类型的任务重阅 + throw new BusinessValidationFailedException(_localizer["VisitTask_ReReadTaskNotApplied"]); + } + + //有序阅片 + if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder) + { + + + //访视影响当前以及当前之后的 两个阅片人的 + filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum); + + + #region 影响的任务 + + + + var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); + + var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault(); + + foreach (var influenceTask in influenceTaskList) + { + //处理申请的任务 + if (influenceTask.Id == origenalTask.Id) + { + + await InfluenceAddtioncalEvaluationCritrionAsync(origenalTask, influenceTaskList.Where(t => t.Id != origenalTask.Id).Where(t => t.SourceSubjectVisitId != null).Select(t => t.SourceSubjectVisitId!.Value).Distinct().ToList()); + + await PMReReadingConfirmOrBackInfluenceAnalysisAsync(origenalTask.SubjectId); + + await SetMedicalReviewInvalidAsync(influenceTaskList); + + } + + + if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) + { + influenceTask.TaskState = TaskState.HaveReturned; + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); + } + else + { + influenceTask.TaskState = TaskState.Adbandon; + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon }); + } + + + } + #endregion + } + //无序阅片 没有 全局 肿瘤学 + else + { + + // 1.当前任务及裁判任务 + // 2.影响所有阅片人的任务 + + var judegTaskNum = origenalTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Judge]; + + filterExpression = filterExpression.And(t => t.VisitTaskNum == origenalTask.VisitTaskNum || t.VisitTaskNum == judegTaskNum); + + + var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); + + //影像列表为空就为null + var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault(); + + foreach (var influenceTask in influenceTaskList) + { + //处理申请的任务 + if (influenceTask.Id == origenalTask.Id) + { + + + await PMReReadingConfirmOrBackInfluenceAnalysisAsync(origenalTask.SubjectId); + + await SetMedicalReviewInvalidAsync(influenceTaskList); + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); + } + else + { + if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) + { + influenceTask.TaskState = TaskState.HaveReturned; + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); + } + else + { + influenceTask.TaskState = TaskState.Adbandon; + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon }); + } + } + } + + } + + + + } + //IR申请 PM 审批 注意这里有一致性分析的申请同意 不会回退访视,在此要生成影响的访视任务 + else if (requestReReadingType == RequestReReadingType.DocotorApply && (IsPMOrAPm() || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR)) + { + + + + //有序阅片 + if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder) + { + #region 有序 IR 申请 重阅 影响的其他访视查询 + + + + switch (origenalTask.ReadingCategory) + { + case ReadingCategory.Visit: + //影响后续访视已经读完的,正在读的,未读的不做处理 以及其他类型任务 + + //申请的是转化的,那么影响列表要排除转化之前的 + if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && origenalTask.BeforeConvertedTaskId != null) + { + + + filterExpression = filterExpression.And(t => (t.VisitTaskNum > origenalTask.VisitTaskNum && + ( + ((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId) + // 裁判 肿瘤学是另外的医生做 + || t.ReadingCategory == ReadingCategory.Judge + || t.ReadingCategory == ReadingCategory.Oncology + )) || t.Id == origenalTask.Id) + ; + } + else if (isIR1Point1AdditionalAssessmentBaseline) + { + filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum && + ((( + ((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId) + // 裁判 肿瘤学是另外的医生做 + || t.ReadingCategory == ReadingCategory.Judge + || t.ReadingCategory == ReadingCategory.Oncology + ) && t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId) || (t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB)) + ); + } + else + { + filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum && + ( + ((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId) + // 裁判 肿瘤学是另外的医生做 + || t.ReadingCategory == ReadingCategory.Judge + || t.ReadingCategory == ReadingCategory.Oncology + ) + ); + } + + + + + + + break; + + + //不影响后续访视: (t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState != ReadingTaskState.WaitReading) || + case ReadingCategory.Global: + + filterExpression = filterExpression.And(t => t.VisitTaskNum > origenalTask.VisitTaskNum && + ((t.DoctorUserId == origenalTask.DoctorUserId && t.ReadingCategory == ReadingCategory.Global) + || (t.ReadingCategory == ReadingCategory.Oncology) || (t.ReadingCategory == ReadingCategory.Judge)) || t.Id == origenalTask.Id); + break; + + case ReadingCategory.Oncology: + + //仅仅影响自己 后续任务如果是访视任务、全局任务或裁判任务,均不处理 + filterExpression = filterExpression.And(t => t.Id == origenalTask.Id); + break; + + case ReadingCategory.Judge: + + //裁判的影响自己 和后续肿瘤学阅片(不是自己做的) + filterExpression = filterExpression.And(t => t.Id == origenalTask.Id || t.VisitTaskNum > origenalTask.VisitTaskNum && t.ReadingCategory == ReadingCategory.Oncology); + + break; + + + default: + //---不支持重阅的任务类型 + throw new BusinessValidationFailedException(_localizer["VisitTask_UnsupportedTaskType"]); + + } + + #endregion + + + + var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).OrderBy(t => t.VisitTaskNum).ToListAsync(); + + var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault(); + + + + foreach (var influenceTask in influenceTaskList) + { + var beforeTaskState = influenceTask.TaskState; + + //已签名的任务 设置转变后的标志 + if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) + { + var isConvertedTask = _visitTaskRepository.Where(t => t.Id == influenceTask.Id).Select(t => t.IsConvertedTask).FirstOrDefault(); + + if (isConvertedTask) + { + influenceTask.IsHistoryConvertedTask = true; + } + } + + + //处理申请的任务 + if (influenceTask.Id == origenalTask.Id) + { + + + await SetMedicalReviewInvalidAsync(influenceTaskList, false); + + await InfluenceAddtioncalEvaluationCritrionAsync(origenalTask, influenceTaskList.Where(t => t.Id != origenalTask.Id).Where(t => t.SourceSubjectVisitId != null).Select(t => t.SourceSubjectVisitId!.Value).Distinct().ToList(), false); + + } + + + + if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) + { + influenceTask.TaskState = TaskState.HaveReturned; + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); + } + else + { + influenceTask.TaskState = TaskState.Adbandon; + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon }); + } + + + #region 受影响的任务生成 + + // 影响的任务 仅仅访视类别的才生成 或者就是IR 申请的任务 + if (influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id) + { + + + // 影响的其他标准的附加评估的任务不立即生成 比如1.1基线 重阅 PM 同意仅仅生成1.1任务,不生成BM任务 + if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment && influenceTask.TrialReadingCriterionId != origenalTask.TrialReadingCriterionId) + { + //BM标准的不生成任务 + continue; + } + + + // i1.1标准 当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成 + if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1) + { + //申请的任务是冻结的任务(该任务发生转变) 影响自己 以及转变后的 以及后续任务 但是生成的时候,仅仅生成转变之前的 + //申请的是转变之后的任务 (转变生成的任务) 影响自己以及后续任务 生成转变后的任务 + if (influenceTask.BeforeConvertedTaskId != null && influenceTaskList.Any(t => t.Id == influenceTask.BeforeConvertedTaskId)) + { + //有转化的任务 和转化之前的任务时,转化后的任务时不生成的 + continue; + + } + + + } + + + await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand() + { + TrialId = trialId, + + ReadingCategory = GenerateTaskCategory.ReReading, + + ReReadingTask = influenceTask, + + //同步才可以 + Action = (newTask) => + { + + + //生成的任务分配给原始医生 + newTask.DoctorUserId = origenalTask.DoctorUserId; + newTask.TaskAllocationState = TaskAllocationState.Allocated; + newTask.AllocateTime = DateTime.Now; + newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget); + + if (visitTaskReReadingAppply != null) + { + //申请表 设置新任务Id + visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id; + + //拷贝原始表单 + if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id == origenalTask.Id) + { + if (origenalTask.ReadingCategory == ReadingCategory.Visit) + { + CopyForms(newTask, origenalTask); + + } + + } + + //拷贝后续表单 + if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum) + { + if (origenalTask.ReadingCategory == ReadingCategory.Visit) + { + CopyForms(newTask, origenalTask); + } + + + } + } + + } + }); + + + + #endregion + + + } + + } + + + + } + //无序阅片 IR只会申请访视类型和裁判类型的任务 注意这里有一致性分析的申请同意 + else + { + + + //1.当前任务及裁判任务 + //2.影响当前阅片人的任务 + filterExpression = filterExpression.And(t => t.Id == origenalTask.Id || t.Id == origenalTask.JudgeVisitTaskId); + + + var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); + + var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault(); + + foreach (var influenceTask in influenceTaskList) + { + //申请原任务处理 + if (influenceTask.Id == origenalTask.Id) + { + + await SetMedicalReviewInvalidAsync(influenceTaskList, false); + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); + } + else + { + if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) + { + influenceTask.TaskState = TaskState.HaveReturned; + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return }); + } + else + { + influenceTask.TaskState = TaskState.Adbandon; + + trakingOrigenalTask?.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon }); + } + } + + #region 受影响任务的生成 + + if (influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id) + { + await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand() + { + TrialId = trialId, + + ReadingCategory = GenerateTaskCategory.ReReading, + + ReReadingTask = origenalTask, + + //同步才可以 + Action = (newTask) => + { + + + ////生成的任务分配给原始医生 + newTask.DoctorUserId = origenalTask.DoctorUserId; + newTask.TaskAllocationState = TaskAllocationState.Allocated; + newTask.AllocateTime = DateTime.Now; + newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget); + + + //裁判任务 需要进行特殊处理 在重阅逻辑里面处理 + + if (visitTaskReReadingAppply != null) + { + //申请表 设置新任务Id + visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id; + + if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id == origenalTask.Id) + { + if (origenalTask.ReadingCategory == ReadingCategory.Visit) + { + CopyForms(newTask, origenalTask); + + } + + } + + //拷贝后续表单 + if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum) + { + if (origenalTask.ReadingCategory == ReadingCategory.Visit) + { + CopyForms(newTask, origenalTask); + + } + } + } + } + }); + + } + #endregion + + } + + } + + } + else + { + //---不符合 PM申请 SPM / CPM审批 | IR申请 PM 审批 + throw new BusinessValidationFailedException(_localizer["VisitTask_ReReadTaskAlreadyAffected"]); + } + } + private void CopyForms(VisitTask newTask, VisitTask origenalTask) { @@ -2166,15 +2205,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, _ = _readingCustomTagRepository.AddRangeAsync(readingCustomTagList).Result; - var readingTaskQuestionMarkList = _readingTaskQuestionMarkRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList(); - - foreach (var item in readingTaskQuestionMarkList) - { - item.Id = Guid.Empty; - item.VisitTaskId = newTask.Id; - } - - _ = _readingTaskQuestionMarkRepository.AddRangeAsync(readingTaskQuestionMarkList).Result; + var readingTaskQuestionAnswerList = _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList(); @@ -2186,6 +2217,16 @@ public class VisitTaskService(IRepository _visitTaskRepository, _ = _readingTaskQuestionAnswerRepository.AddRangeAsync(readingTaskQuestionAnswerList).Result; + var readingTaskQuestionMarkList = _readingTaskQuestionMarkRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList(); + + foreach (var item in readingTaskQuestionMarkList) + { + item.Id = Guid.Empty; + item.FristAddTaskId = item.VisitTaskId == item.FristAddTaskId ? newTask.Id : item.FristAddTaskId; + item.VisitTaskId = newTask.Id; + } + + //ReadingTableAnswerRowInfo ReadingTableQuestionAnswer 一起加 var readingTableAnswerRowInfoList = _readingTableAnswerRowInfoRepository.Where(t => t.VisitTaskId == origenalTask.Id).Include(t => t.LesionAnswerList).ToList(); @@ -2196,7 +2237,14 @@ public class VisitTaskService(IRepository _visitTaskRepository, var originalVisitTaskId = item.VisitTaskId; var originalFristAddTaskId = item.FristAddTaskId; - item.Id = NewId.NextSequentialGuid(); + var newRowId= NewId.NextSequentialGuid(); + + foreach (var mark in readingTaskQuestionMarkList) + { + mark.RowId = mark.RowId == item.Id ? newRowId : mark.RowId; + } + + item.Id = newRowId; item.VisitTaskId = newTask.Id; //默认值是当前任务添加的 @@ -2211,6 +2259,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, } } + _ = _readingTaskQuestionMarkRepository.AddRangeAsync(readingTaskQuestionMarkList).Result; _ = _readingTableAnswerRowInfoRepository.AddRangeAsync(readingTableAnswerRowInfoList).Result; @@ -2554,6 +2603,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, return _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM; } + private bool IsSpmOrCPM() { return _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM ; @@ -2576,7 +2626,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == filterObj.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAdditionalAssessment, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync()).IfNullThrowException(); - Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == filterObj.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.TaskAllocationState == TaskAllocationState.Allocated; + Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == filterObj.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) /*&& t.TaskAllocationState == TaskAllocationState.Allocated*/; //是否是一致性分析任务 (一致性分析的任务 不会产生裁判 肿瘤学 仅仅有生成的访视和全局) @@ -2590,7 +2640,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, { // IR 申请 PM 同意 - if (((IsPMOrAPm() && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer)) + if (((IsPMOrAPm() && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUserRole.UserTypeEnum == UserTypeEnum.IndependentReviewer)) || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))) { @@ -2633,7 +2683,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, //IR 申请 PM 同意 仅仅影响自己 - if ((IsPMOrAPm() && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer)) + if ((IsPMOrAPm() && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUserRole.UserTypeEnum == UserTypeEnum.IndependentReviewer)) || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null)) { @@ -2752,7 +2802,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, //PM 影响所有阅片人 仅仅针对访视 SPM CPM 调用 else if (((IsSpmOrCPM()) && applyId != null && - await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && (t.CreateUser.UserTypeEnum == UserTypeEnum.ProjectManager || t.CreateUser.UserTypeEnum == UserTypeEnum.APM)) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit) + await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && (t.CreateUserRole.UserTypeEnum == UserTypeEnum.ProjectManager || t.CreateUserRole.UserTypeEnum == UserTypeEnum.APM)) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit) || (IsPMOrAPm() && applyId == null)) { @@ -2850,7 +2900,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, var list = await _visitTaskRepository.Where(filterExpression) //IR 申请的时候,仅仅看到影响自己的 - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer, t => t.DoctorUserId == _userInfo.Id) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer, t => t.DoctorUserId == _userInfo.UserRoleId) .OrderBy(t => t.VisitTaskNum).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); #region 影响后的操作 diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 4beb54f0d..889f4a29b 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -17,9 +17,9 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) - .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.FullName)) .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName)); List subjectIdList = new List(); @@ -27,9 +27,9 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) - .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.FullName)) .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName)) //.ForMember(o => o.ArmList, t => t.MapFrom(u => u.DoctorVisitTaskList.Where(c => c.TrialId == u.TrialId).Select(t => t.ArmEnum).Distinct())) .ForMember(o => o.TotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count())) @@ -127,9 +127,9 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.SubjectCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindSubjectCode :*/ u.Subject.Code)) .ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.Subject.MedicalNo)) - .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) - .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.FullName)) .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName)) //.ForMember(o => o.IsClinicalDataSigned, t => t.MapFrom(u => u.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == u.SouceReadModuleId || c.ReadingId == u.SourceSubjectVisitId)))) ; @@ -176,9 +176,9 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) - .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.FullName)) .ForMember(o => o.JudgeTaskCode, t => t.MapFrom(u => u.TaskCode)) .ForMember(o => o.DoctorUserId, t => t.MapFrom(u => u.DoctorUser.Id)); @@ -195,9 +195,9 @@ namespace IRaCIS.Core.Application.Service CreateMap() //.ForMember(o => o.AssignTime, t => t.MapFrom(u => u.AssignTime)) - .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) - .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.FullName)) .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName)); @@ -205,7 +205,7 @@ namespace IRaCIS.Core.Application.Service CreateMap(); - CreateMap() + CreateMap() .ForMember(o => o.DoctorUserId, t => t.MapFrom(u => u.Id)) .ForMember(o => o.FullName, t => t.MapFrom(u => u.FullName)); @@ -250,12 +250,12 @@ namespace IRaCIS.Core.Application.Service - CreateMap() + CreateMap() .ForMember(o => o.UserId, t => t.MapFrom(u => u.Id)) - .ForMember(o => o.UserCode, t => t.MapFrom(u => u.UserCode)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.UserName)) - .ForMember(o => o.FullName, t => t.MapFrom(u => u.FullName)); + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.IdentityUser.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.IdentityUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.IdentityUser.FullName)); //.ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.UserTypeRole.UserTypeShortName)); diff --git a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs index 084f205ad..5ea3f87dc 100644 --- a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs @@ -31,7 +31,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(queryCommonDocument.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryCommonDocument.BusinessScenarioEnum) .WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Code), t => t.Code.Contains(queryCommonDocument.Code)) .WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name) || t.NameCN.Contains(queryCommonDocument.Name)) - .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id }); + .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.UserRoleId }); return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument); } diff --git a/IRaCIS.Core.Application/Service/Common/DTO/InternationalizationViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/InternationalizationViewModel.cs index 86c3a9e6b..76722ca91 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/InternationalizationViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/InternationalizationViewModel.cs @@ -110,6 +110,8 @@ namespace IRaCIS.Core.Application.ViewModel public string Module { get; set; } = string.Empty; + public int? State { get; set; } + } public class BatchAddInternationalizationDto : BatchInternationalizationDto diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index 2a35844f8..b03622dab 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -12,20 +12,24 @@ using IRaCIS.Core.Infra.EFCore.Migrations; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using NPOI.HPSF; using NPOI.POIFS.Properties; using NPOI.SS.Formula.Functions; using NPOI.XSSF.UserModel; using System.ComponentModel.Design; using System.Globalization; +using System.IO; using System.Linq; using static IRaCIS.Core.Application.Service.ExcelExportHelper; using IDictionaryService = IRaCIS.Application.Interfaces.IDictionaryService; +using TrialIdentityUser = IRaCIS.Core.Domain.Models.TrialIdentityUser; namespace IRaCIS.Core.Application.Service.Common { [ApiExplorerSettings(GroupName = "Common")] - public class ExcelExportService(IRepository _trialUserRepository, + public class ExcelExportService(IRepository _trialUserRoleRepository, IRepository _visitTaskRepository, IRepository _readingQuestionCriterionTrialRepository, IRepository _systemDocNeedConfirmedUserTypeRepository, @@ -35,9 +39,9 @@ namespace IRaCIS.Core.Application.Service.Common IRepository _noneDicomStudyRepository, IRepository _studyMonitorRepository, IRepository _commonDocumentRepository, - IRepository _systemDocConfirmedUserRepository, + IRepository _systemDocConfirmedUserRepository, IRepository _trialDocNeedConfirmedUserTypeRepository, - IRepository _trialDocConfirmedUserRepository, + IRepository _trialDocConfirmedUserRepository, IRepository _subjectRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService { @@ -54,7 +58,7 @@ namespace IRaCIS.Core.Application.Service.Common /// /// /// - /// + /// /// /// [HttpPost] @@ -63,7 +67,7 @@ namespace IRaCIS.Core.Application.Service.Common [FromServices] IRepository _commonDocumentRepository, [FromServices] IDictionaryService _dictionaryService, [FromServices] IRepository _trialRepository, - [FromServices] IRepository _trialUseRepository + [FromServices] IRepository _trialUseRoleRepository ) { @@ -71,16 +75,34 @@ namespace IRaCIS.Core.Application.Service.Common var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException(); - var list = await _trialUseRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters() - .WhereIf(param.UserTypeId != null, t => t.User.UserTypeId == param.UserTypeId) - .WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.User.UserName.Contains(param.UserName)) + var list = await _trialUseRoleRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters() + .WhereIf(param.UserTypeId != null, t => t.UserRole.UserTypeId == param.UserTypeId) + .WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.UserRole.IdentityUser.UserName.Contains(param.UserName)) .WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted) .WhereIf(!string.IsNullOrWhiteSpace(param.OrganizationName), - t => t.User.OrganizationName.Contains(param.OrganizationName)) + t => t.UserRole.OrganizationName.Contains(param.OrganizationName)) .WhereIf(!string.IsNullOrWhiteSpace(param.UserRealName), - t => (t.User.FullName).Contains(param.UserRealName)) - .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + t => (t.UserRole.FullName).Contains(param.UserRealName)) + .Select(t => new TrialMaintenanceDTO() + { + UserRealName = t.UserRole.IdentityUser.FullName, + UserName = t.UserRole.IdentityUser.UserName, + UserType = t.UserRole.UserTypeRole.UserTypeShortName, + Phone = t.UserRole.IdentityUser.Phone, + EMail = t.UserRole.IdentityUser.EMail, + OrganizationName = t.UserRole.IdentityUser.OrganizationName, + + IsDeleted = t.TrialUser.IsDeleted, + JoinTime = t.TrialUser.JoinTime, + RemoveTime = t.TrialUser.RemoveTime, + + //角色授权禁用时间 + RoleIsDeleted = t.IsDeleted, + CreateTime = t.CreateTime, + DeletedTime = t.DeletedTime, + }).OrderBy(t => t.UserRealName) + .ToListAsync(); exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId); exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId); @@ -98,7 +120,7 @@ namespace IRaCIS.Core.Application.Service.Common /// /// /// - /// + /// /// /// [HttpPost] @@ -107,14 +129,14 @@ namespace IRaCIS.Core.Application.Service.Common [FromServices] IRepository _commonDocumentRepository, [FromServices] IDictionaryService _dictionaryService, [FromServices] IRepository _trialRepository, - [FromServices] IRepository _trialSiteUserRepository + [FromServices] IRepository _trialSiteUserRoleRepository ) { var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException(); - var list = await _trialSiteUserRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters() + var list = await _trialSiteUserRoleRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters() .WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted) .WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.TrialSite.TrialSiteName.Contains(param.SiteName) || t.TrialSite.TrialSiteAliasName.Contains(param.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName), @@ -122,9 +144,9 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode), t => t.TrialSite.TrialSiteCode.Contains(param.TrialSiteCode)) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, - t => t.UserId == _userInfo.Id) - .WhereIf(!string.IsNullOrWhiteSpace(param.UserKeyInfo), t => (t.User.FullName).Contains(param.UserKeyInfo) - || t.User.UserName.Contains(param.UserKeyInfo) || t.User.EMail.Contains(param.UserKeyInfo)) + t => t.UserId == _userInfo.UserRoleId) + .WhereIf(!string.IsNullOrWhiteSpace(param.UserKeyInfo), t => (t.UserRole.FullName).Contains(param.UserKeyInfo) + || t.UserRole.IdentityUser.UserName.Contains(param.UserKeyInfo) || t.UserRole.IdentityUser.EMail.Contains(param.UserKeyInfo)) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); @@ -223,9 +245,9 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code)) .WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName)) - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.IsDeleted == false) && t.IsDeleted == false) .WhereIf(inQuery.CriterionType != null, o => o.TrialReadingCriterionList.Any(t => t.CriterionType == inQuery.CriterionType && t.IsSigned && t.IsConfirm)) - .WhereIf(!string.IsNullOrEmpty(inQuery.PM_EMail), o => o.TrialUserList.Any(t => t.User.EMail.Contains(inQuery.PM_EMail) && (t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM))) + .WhereIf(!string.IsNullOrEmpty(inQuery.PM_EMail), o => o.TrialUserRoleList.Any(t => t.UserRole.IdentityUser.EMail.Contains(inQuery.PM_EMail) && (t.UserRole.UserTypeEnum == UserTypeEnum.ProjectManager || t.UserRole.UserTypeEnum == UserTypeEnum.APM))) .Select(t => new TrialToBeDoneDto() { TrialId = t.Id, @@ -250,49 +272,49 @@ namespace IRaCIS.Core.Application.Service.Common SPM_ReviewerSelectApprovalCount = isSPMOrCPM ? t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count() : 0, - MIM_UrgentCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + MIM_UrgentCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .Where(u => u.VisitTask.IsUrgent && u.AuditState != MedicalReviewAuditState.HaveSigned).Count() : 0, - MIM_PendingResponseCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + MIM_PendingResponseCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IndependentReviewer && u.AuditState == MedicalReviewAuditState.Auditing).Count() : 0, - MIM_PendingReviewCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + MIM_PendingReviewCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .Where(u => u.AuditState != MedicalReviewAuditState.HaveSigned && u.LatestReplyUser.UserTypeEnum != UserTypeEnum.IndependentReviewer).Count() : 0, - CRC_UrgentCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id) && t.IsUrgent).Count() : 0, + CRC_UrgentCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId) && t.IsUrgent).Count() : 0, - CRC_CheckQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + CRC_CheckQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count() : 0, - CRC_QCQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)).SelectMany(c => c.QCChallengeList) + CRC_QCQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).SelectMany(c => c.QCChallengeList) .Where(u => u.IsClosed == false && (u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC || u.LatestReplyUserId == null)).Count() : 0, //待审核 审核中 加急的数量 - IQC_UrgentCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && t.QCProcessEnum != TrialQCProcess.NotAudit && t.IsUrgent).Count() : 0, + IQC_UrgentCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && t.QCProcessEnum != TrialQCProcess.NotAudit && t.IsUrgent).Count() : 0, //审核未完成 - IQC_AuditToBeDealedCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && t.QCProcessEnum != TrialQCProcess.NotAudit).Count() : 0, + IQC_AuditToBeDealedCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && t.QCProcessEnum != TrialQCProcess.NotAudit).Count() : 0, //质疑待处理 IQC_QuestionToBeDealedCount = isIQC ? t.SubjectVisitList.SelectMany(c => c.QCChallengeList) - .Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0, + .Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0, //待领取 IQC_ToBeClaimedCount = isIQC ? t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed) - .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count() : 0, + .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count() : 0, IR_ReadingCriterionList = isIR ? t.TrialReadingCriterionList.Where(t => t.IsConfirm && t.IsSigned).OrderBy(t => t.CriterionName).Select(t => t.CriterionName).ToList() : null, - IR_PMEmailList = isIR ? t.TrialUserList.Where(t => t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM).OrderBy(t => t.User.EMail).Select(t => t.User.EMail).ToList() : null, + IR_PMEmailList = isIR ? t.TrialUserRoleList.Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.ProjectManager || t.UserRole.UserTypeEnum == UserTypeEnum.APM).OrderBy(t => t.UserRole.IdentityUser.EMail).Select(t => t.UserRole.IdentityUser.EMail).ToList() : null, - IR_TotalReadCount = isIR ? t.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() : 0, + IR_TotalReadCount = isIR ? t.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() : 0, IR_UnReadCount = isIR ? t.VisitTaskList - .Where(c => c.DoctorUserId == _userInfo.Id && c.ReadingTaskState != ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterion.IsSigned) + .Where(c => c.DoctorUserId == _userInfo.UserRoleId && c.ReadingTaskState != ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterion.IsSigned) // 前序 不存在 未一致性核查未通过的 .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum)) //前序 不存在 未生成任务的访视 @@ -342,91 +364,208 @@ namespace IRaCIS.Core.Application.Service.Common [FromServices] IRepository _commonDocumentRepository, [FromServices] IDictionaryService _dictionaryService, [FromServices] IRepository _subjectVisitRepository, - [FromServices] IRepository _trialRepository + [FromServices] IRepository _trialRepository, + [FromServices] IRepository _trialDocumentRepository, + [FromServices] IRepository _trialIdentityUserRepository, + [FromServices] IRepository _systemDocumentRepository ) { - var trialInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync()); - var trialDocQuery = from trialDocumentNeedConfirmedUserType in _trialDocNeedConfirmedUserTypeRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) - join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId) - .WhereIf(inQuery.UserId != null, t => t.UserId == inQuery.UserId) - .WhereIf(inQuery.UserTypeId != null, t => t.User.UserTypeId == inQuery.UserTypeId) - on trialDocumentNeedConfirmedUserType.NeedConfirmUserTypeId equals trialUser.User.UserTypeId - join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on - new { trialUser.UserId, TrialDocumentId = trialDocumentNeedConfirmedUserType.TrialDocumentId } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc - from confirm in cc.DefaultIfEmpty() - select new TrainingRecordExportDTO() - { - IsSystemDoc = false, + #region 导表新 - Id = trialDocumentNeedConfirmedUserType.TrialDocument.Id, - CreateTime = trialDocumentNeedConfirmedUserType.TrialDocument.CreateTime, - IsDeleted = trialDocumentNeedConfirmedUserType.TrialDocument.IsDeleted, - //SignViewMinimumMinutes = trialDocumentNeedConfirmedUserType.TrialDocument.SignViewMinimumMinutes, - Name = trialDocumentNeedConfirmedUserType.TrialDocument.Name, - //Path = trialDocumentNeedConfirmedUserType.TrialDocument.Path, - FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId, - FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN, - //UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime, - //IsConfirmed= confirm.ConfirmTime!=null, + var trialInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId, ignoreQueryFilters: true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync()); + + var trialDocQuery = + from trialDoc in _trialDocumentRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId) + .Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true) + from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId + && t.TrialUserRoleList.AsQueryable().Any(t => trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId)) + ) + .Where(t => inQuery.UserId != null ? t.IdentityUserId == inQuery.UserId : true) + + join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on + new { trialUser.IdentityUserId, TrialDocumentId = trialDoc.Id } equals new { IdentityUserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc + from confirm in cc.DefaultIfEmpty() + select new TrainingRecordExportDTO() + { + IsSystemDoc = false, + + Id = trialDoc.Id, + CreateTime = trialDoc.CreateTime, + IsDeleted = trialDoc.IsDeleted, + Name = trialDoc.Name, + FileTypeId = trialDoc.FileTypeId, + FileType = _userInfo.IsEn_Us ? trialDoc.FileType.Value : trialDoc.FileType.ValueCN, + //IsConfirmed= confirm.ConfirmTime!=null, + + + ConfirmUserId = trialUser.IdentityUserId, + ConfirmTime = confirm.ConfirmTime, + RealName = trialUser.IdentityUser.FullName, + UserName = trialUser.IdentityUser.UserName, + + //UserTypeId = trialUser.UserRole.UserTypeId, + //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, + //DocNeedSignUserTypeList = trialDoc.NeedConfirmedUserTypeList.Select(t => t.UserTypeRole.UserTypeName), + + }; - //ConfirmUserId = confirm.ConfirmUserId, - ConfirmTime = confirm.ConfirmTime, - RealName = trialUser.User.FullName, - UserName = trialUser.User.UserName, - UserTypeId = trialUser.User.UserTypeId, - UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName, + var systemDocQuery = + from sysDoc in _systemDocumentRepository.AsQueryable(false).Where(u => trialInfo.TrialFinishedTime != null ? u.CreateTime < trialInfo.TrialFinishedTime : true) + from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId + && t.TrialUserRoleList.Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId))) + .Where(t => inQuery.UserId != null ? t.IdentityUserId == inQuery.UserId : true) - //FullFilePath = trialDocumentNeedConfirmedUserType.TrialDocument.Path - }; + join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.IdentityUserId, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc + from confirm in cc.DefaultIfEmpty() + select new TrainingRecordExportDTO() + { + IsSystemDoc = true, + Id = sysDoc.Id, + CreateTime = sysDoc.CreateTime, + IsDeleted = sysDoc.IsDeleted, + Name = sysDoc.Name, + FileType = _userInfo.IsEn_Us ? sysDoc.FileType.Value : sysDoc.FileType.ValueCN, + FileTypeId = sysDoc.FileTypeId, + //IsConfirmed = confirm.ConfirmTime != null, + ConfirmUserId = trialUser.IdentityUserId, + ConfirmTime = confirm.ConfirmTime, - var systemDocQuery = from needConfirmEdUserType in _systemDocNeedConfirmedUserTypeRepository.WhereIf(trialInfo.TrialFinishedTime != null, u => u.SystemDocument.CreateTime < trialInfo.TrialFinishedTime) + RealName = trialUser.IdentityUser.FullName, + UserName = trialUser.IdentityUser.UserName, - join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId) - .WhereIf(inQuery.UserId != null, t => t.UserId == inQuery.UserId) - on needConfirmEdUserType.NeedConfirmUserTypeId equals trialUser.User.UserTypeId - join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.UserId, SystemDocumentId = needConfirmEdUserType.SystemDocumentId } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc - from confirm in cc.DefaultIfEmpty() - select new TrainingRecordExportDTO() - { - IsSystemDoc = true, + //UserTypeId = trialUser.UserRole.UserTypeId, + //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, - Id = needConfirmEdUserType.SystemDocument.Id, - CreateTime = needConfirmEdUserType.SystemDocument.CreateTime, - IsDeleted = needConfirmEdUserType.SystemDocument.IsDeleted, - //SignViewMinimumMinutes = needConfirmEdUserType.SystemDocument.SignViewMinimumMinutes, - Name = needConfirmEdUserType.SystemDocument.Name, - //Path = needConfirmEdUserType.SystemDocument.Path, - FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN, - FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId, - //UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime, - //IsConfirmed = confirm.ConfirmTime != null, + }; - //ConfirmUserId = confirm.ConfirmUserId, - ConfirmTime = confirm.ConfirmTime, - RealName = trialUser.User.FullName, - UserName = trialUser.User.UserName, - UserTypeId = trialUser.User.UserTypeId, - UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName, + //var tt = await trialDocQuery.ToPagedListAsync(inQuery); - //FullFilePath = needConfirmEdUserType.SystemDocument.Path - }; - - var unionQuery = trialDocQuery.Union(systemDocQuery) + var unionQuery = trialDocQuery.Union(systemDocQuery).IgnoreQueryFilters().Where(t => !(t.IsDeleted == true && t.ConfirmTime == null)) .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) .WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null) .WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null) - .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) - .WhereIf(inQuery.UserTypeId != null, t => t.UserTypeId == inQuery.UserTypeId); + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted); + #endregion + + #region 废弃 + //var trialInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync()); + + //var trialDocQuery = from trialDocumentNeedConfirmedUserType in _trialDocNeedConfirmedUserTypeRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) + // join trialUser in _trialUserRoleRepository.Where(t => t.TrialId == inQuery.TrialId) + // .WhereIf(inQuery.UserId != null, t => t.UserId == inQuery.UserId) + // .WhereIf(inQuery.UserTypeId != null, t => t.UserRole.UserTypeId == inQuery.UserTypeId) + // on trialDocumentNeedConfirmedUserType.NeedConfirmUserTypeId equals trialUser.UserRole.UserTypeId + + // join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on + // new { trialUser.UserId, TrialDocumentId = trialDocumentNeedConfirmedUserType.TrialDocumentId } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc + // from confirm in cc.DefaultIfEmpty() + // select new TrainingRecordExportDTO() + // { + // IsSystemDoc = false, + + // Id = trialDocumentNeedConfirmedUserType.TrialDocument.Id, + // CreateTime = trialDocumentNeedConfirmedUserType.TrialDocument.CreateTime, + // IsDeleted = trialDocumentNeedConfirmedUserType.TrialDocument.IsDeleted, + // //SignViewMinimumMinutes = trialDocumentNeedConfirmedUserType.TrialDocument.SignViewMinimumMinutes, + // Name = trialDocumentNeedConfirmedUserType.TrialDocument.Name, + // //Path = trialDocumentNeedConfirmedUserType.TrialDocument.Path, + // FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId, + // FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN, + // //UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime, + // //IsConfirmed= confirm.ConfirmTime!=null, + + + + // //ConfirmUserId = confirm.ConfirmUserId, + // ConfirmTime = confirm.ConfirmTime, + // RealName = trialUser.UserRole.FullName, + // UserName = trialUser.UserRole.IdentityUser.UserName, + // UserTypeId = trialUser.UserRole.UserTypeId, + // UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, + + // //FullFilePath = trialDocumentNeedConfirmedUserType.TrialDocument.Path + // }; + + + + //var systemDocQuery = from needConfirmEdUserType in _systemDocNeedConfirmedUserTypeRepository.WhereIf(trialInfo.TrialFinishedTime != null, u => u.SystemDocument.CreateTime < trialInfo.TrialFinishedTime) + + // join trialUser in _trialUserRoleRepository.Where(t => t.TrialId == inQuery.TrialId) + // .WhereIf(inQuery.UserId != null, t => t.UserId == inQuery.UserId) + // on needConfirmEdUserType.NeedConfirmUserTypeId equals trialUser.UserRole.UserTypeId + // join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.UserId, SystemDocumentId = needConfirmEdUserType.SystemDocumentId } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc + // from confirm in cc.DefaultIfEmpty() + // select new TrainingRecordExportDTO() + // { + // IsSystemDoc = true, + + // Id = needConfirmEdUserType.SystemDocument.Id, + // CreateTime = needConfirmEdUserType.SystemDocument.CreateTime, + // IsDeleted = needConfirmEdUserType.SystemDocument.IsDeleted, + // //SignViewMinimumMinutes = needConfirmEdUserType.SystemDocument.SignViewMinimumMinutes, + // Name = needConfirmEdUserType.SystemDocument.Name, + // //Path = needConfirmEdUserType.SystemDocument.Path, + // FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN, + // FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId, + // //UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime, + // //IsConfirmed = confirm.ConfirmTime != null, + + // //ConfirmUserId = confirm.ConfirmUserId, + // ConfirmTime = confirm.ConfirmTime, + // RealName = trialUser.UserRole.FullName, + // UserName = trialUser.UserRole.IdentityUser.UserName, + // UserTypeId = trialUser.UserRole.UserTypeId, + // UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, + + // //FullFilePath = needConfirmEdUserType.SystemDocument.Path + // }; + + //var unionQuery = trialDocQuery.Union(systemDocQuery) + // .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) + // .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) + // .WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null) + // .WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null) + // .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + // .WhereIf(inQuery.UserTypeId != null, t => t.UserTypeId == inQuery.UserTypeId); + + #endregion var list = await unionQuery.ToListAsync(); + var trialDocIdList = list.Where(t => t.IsSystemDoc == false).Select(t => t.Id).ToList(); + + var sysDocIdList = list.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList(); + + var trialIdentityUserIdList = list.Select(t => t.ConfirmUserId).Distinct().ToList(); + + var trialDocUserTypeList = _trialDocNeedConfirmedUserTypeRepository.Where(t => trialDocIdList.Contains(t.TrialDocumentId)).Select(t => new { t.TrialDocumentId, t.UserTypeRole.UserTypeShortName }).ToList(); + + var sysDocUserTypeList = _systemDocNeedConfirmedUserTypeRepository.Where(t => sysDocIdList.Contains(t.SystemDocumentId)).Select(t => new { t.SystemDocumentId, t.UserTypeRole.UserTypeShortName }).ToList(); + + var trialUserUserTypeList = _trialIdentityUserRepository.Where(t => t.TrialId == inQuery.TrialId && trialIdentityUserIdList.Contains(t.IdentityUserId)).IgnoreQueryFilters().Select(t => new { t.IdentityUserId, UserTypeList = t.TrialUserRoleList.Select(c => c.UserRole.UserTypeRole.UserTypeShortName).ToList() }); + + + foreach (var item in list) + { + if (item.IsSystemDoc) + { + item.DocNeedSignUserTypeList = sysDocUserTypeList.Where(t => t.SystemDocumentId == item.Id).Select(t => t.UserTypeShortName).ToList(); + } + else + { + item.DocNeedSignUserTypeList = trialDocUserTypeList.Where(t => t.TrialDocumentId == item.Id).Select(t => t.UserTypeShortName).ToList(); + } + + item.IdentityUserTypeList = trialUserUserTypeList.Where(t => t.IdentityUserId == item.ConfirmUserId).SelectMany(c => c.UserTypeList).ToList(); + } + var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException(); @@ -479,7 +618,7 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(inQuery.SubmitState != null, t => t.SubmitState == inQuery.SubmitState) .WhereIf(inQuery.ChallengeState != null, t => t.ChallengeState == inQuery.ChallengeState) .WhereIf(inQuery.IsUrgent != null, t => t.IsUrgent == inQuery.IsUrgent) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .ProjectTo(_mapper.ConfigurationProvider); var list = query.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.BlindName).ToList(); @@ -587,7 +726,7 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == true, t => t.IsClosed ? t.ClosedTime > t.DeadlineTime : DateTime.Now > t.DeadlineTime) .WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == false, t => t.IsClosed ? t.ClosedTime < t.DeadlineTime : DateTime.Now < t.DeadlineTime) .WhereIf(inQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == inQuery.IsUrgent) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .ProjectTo(_mapper.ConfigurationProvider); @@ -628,7 +767,7 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) // CRC 只负责他管理site的受试者 - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .ProjectTo(_mapper.ConfigurationProvider) .WhereIf(inQuery.IsMissingImages == true, t => t.MissingSubmmitCount > 0) .WhereIf(inQuery.IsMissingImages == false, t => t.MissingSubmmitCount == 0) @@ -810,7 +949,7 @@ namespace IRaCIS.Core.Application.Service.Common var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(inQuery.VisitPlanArray); var StudyMonitorQuery = _studyMonitorRepository.Where(t => t.TrialId == inQuery.TrialId, ignoreQueryFilters: true) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) //.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo)) .WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo)) @@ -818,7 +957,7 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectId == inQuery.SubjectVisitId) .WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.IsDicom != null, t => t.IsDicom == inQuery.IsDicom) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUser.UserName.Contains(inQuery.Uploader)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUserRole.IdentityUser.UserName.Contains(inQuery.Uploader)) .WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.StudyCode), t => t.StudyCode.Contains(inQuery.StudyCode)) .Select(t => new UnionStudyMonitorExportDto() @@ -835,7 +974,7 @@ namespace IRaCIS.Core.Application.Service.Common IsDicom = t.IsDicom, - Uploader = t.CreateUser.UserName, + Uploader = t.CreateUserRole.IdentityUser.UserName, IP = t.IP, @@ -925,7 +1064,7 @@ namespace IRaCIS.Core.Application.Service.Common var svExpression = QCCommon.GetDicomStudySubjectVisitFilter(studyQuery.VisitPlanArray); var dicomStudyQuery = _dicomStudyRepository.Where(t => t.TrialId == studyQuery.TrialId) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression) .WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo)) .Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed) @@ -953,7 +1092,7 @@ namespace IRaCIS.Core.Application.Service.Common var nodeDicomStudyQuery = _noneDicomStudyRepository.Where(t => t.TrialId == studyQuery.TrialId) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression2) .WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo)) .Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed) @@ -1022,7 +1161,7 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo)) .WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression) //.WhereIf(!string.IsNullOrEmpty(checkQuery.VisitPlanInfo), checkQuery.VisitPlanInfo.Contains('.') ? t => t.InPlan == false : t => t.VisitNum == decimal.Parse(checkQuery.VisitPlanInfo)) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))//CRC 过滤负责的site .ProjectTo(_mapper.ConfigurationProvider); var list = query.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.VisitNum).ToList(); @@ -1233,9 +1372,9 @@ namespace IRaCIS.Core.Application.Service.Common var query = _trialImageDownloadRepository.Where(t => t.TrialId == inQuery.TrialId) .WhereIf(inQuery.SubjectCode.IsNotNullOrEmpty(), t => t.SubjectCode.Contains(inQuery.SubjectCode)) .WhereIf(inQuery.IP.IsNotNullOrEmpty(), t => t.IP.Contains(inQuery.IP)) - .WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUser.UserName.Contains(inQuery.Name) || t.CreateUser.FullName.Contains(inQuery.Name)) + .WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUserRole.IdentityUser.UserName.Contains(inQuery.Name) || t.CreateUserRole.FullName.Contains(inQuery.Name)) .WhereIf(inQuery.ImageType != null, t => t.ImageType == inQuery.ImageType) - .WhereIf(inQuery.UserType != null, t => t.CreateUser.UserTypeEnum == inQuery.UserType) + .WhereIf(inQuery.UserType != null, t => t.CreateUserRole.UserTypeEnum == inQuery.UserType) .WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess) .WhereIf(inQuery.DownloadStartTime != null, t => t.DownloadStartTime >= inQuery.DownloadStartTime) .WhereIf(inQuery.DownloadEndTime != null, t => t.DownloadEndTime <= inQuery.DownloadEndTime) @@ -1837,6 +1976,8 @@ namespace IRaCIS.Core.Application.Service.Common var export_Template = StaticData.Export.TrialSelfAnalysisList_Export; + #region 自身一致性分析和组间一致性分析 + if (inQuery.ReadingExportType == ExportResult.DetailedTableOfIntraReaderAnalysisResults) { //找到非一致性分析的任务 @@ -1918,6 +2059,8 @@ namespace IRaCIS.Core.Application.Service.Common } + #endregion + var columNameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.QuestionName.IsNotNullOrEmpty()).Select(t => t.QuestionName).Distinct().ToList(); exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId); @@ -1925,6 +2068,7 @@ namespace IRaCIS.Core.Application.Service.Common var dynamicColumnConfig = new DynamicColumnConfig() { + //可读的列表名行索引,不是{{}} 模板行索引 AutoColumnTitleRowIndex = 2, AutoColumnStartIndex = 5, TempalteLastColumnIndex = 4, @@ -1958,20 +2102,20 @@ namespace IRaCIS.Core.Application.Service.Common var list = new List(); - var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == trialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync(); + var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == trialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionGroup, t.CriterionName, t.ArbitrationRule, t.IsArbitrationReading }).FirstNotNullAsync(); list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonReading_Export, ExportCatogory = ExportResult.TableOfAssessmentResults }); list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonReadingDetail_Export, ExportCatogory = ExportResult.DetailedTableOfAssessmentResults }); + if (criterion.IsArbitrationReading) + { + //仲裁阅片 才有裁判阅片明细表 同时要把模板里面的三列给去掉 + list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonJudgeReadingDetail_Export, ExportCatogory = ExportResult.DetailedTableOfAdjudicationResults }); + } - list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonJudgeReadingDetail_Export, ExportCatogory = ExportResult.DetailedTableOfAdjudicationResults }); - - - if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB - || criterion.CriterionType == CriterionType.IRECIST1Point1 || criterion.CriterionType == CriterionType.Lugano2014 - || criterion.CriterionType == CriterionType.Lugano2014WithoutPET || criterion.CriterionType == CriterionType.PCWG3) + if (criterion.CriterionGroup == CriterionGroup.Tumor) { list.Add(new ExportDocumentDes() { Code = StaticData.Export.ReadingLession_Export, ExportCatogory = ExportResult.DetailedTableOfLesions }); } @@ -1980,6 +2124,10 @@ namespace IRaCIS.Core.Application.Service.Common { list.Add(new ExportDocumentDes() { Code = StaticData.Export.OCT_ReadingLession_Export, ExportCatogory = ExportResult.OCT_ReadingLession_Export }); } + //else if (criterion.CriterionType == CriterionType.SelfDefine) + { + list.Add(new ExportDocumentDes() { Code = StaticData.Export.CDISC_Reading_Export, ExportCatogory = ExportResult.CDISC }); + } switch (criterion.ArbitrationRule) { @@ -2001,29 +2149,6 @@ namespace IRaCIS.Core.Application.Service.Common } - //if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB) - //{ - // list.Add(new ExportDocumentDes() { Code = StaticData.Export.OverallTumorEvaluation_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation }); - // list.Add(new ExportDocumentDes() { Code = StaticData.Export.RECIST1Point1EvaluationOfTumorEfficacy_Export, ExportCatogory = ExportCatogory.EvaluationOfTumorEfficacy }); - // list.Add(new ExportDocumentDes() { Code = StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion }); - //} - - //else if (criterion.CriterionType == CriterionType.PCWG3) - //{ - // list.Add(new ExportDocumentDes() { Code = StaticData.Export.OverallTumorEvaluation_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation }); - // list.Add(new ExportDocumentDes() { Code = StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion }); - //} - //else if (criterion.CriterionType == CriterionType.IRECIST1Point1) - //{ - // list.Add(new ExportDocumentDes() { Code = StaticData.Export.OverallTumorEvaluation_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation }); - // list.Add(new ExportDocumentDes() { Code = StaticData.Export.IRECIST1Point1EvaluationOfTumorEfficacy_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion }); - //} - //else if (criterion.CriterionType == CriterionType.Lugano2014) - //{ - // list.Add(new ExportDocumentDes() { Code = StaticData.Export.OverallTumorEvaluation_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation }); - // list.Add(new ExportDocumentDes() { Code = StaticData.Export.Lugano2014EvaluationOfTumorEfficacy_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion }); - //} - var result = _commonDocumentRepository.Where(t => list.Select(c => c.Code).Contains(t.Code)).Select(c => new ExportDocumentDes() { Code = c.Code, FileName = _userInfo.IsEn_Us ? c.Name : c.NameCN }).ToList(); foreach (var item in list) @@ -2045,10 +2170,14 @@ namespace IRaCIS.Core.Application.Service.Common public async Task GetCommonEvaluationList_Export(VisitTaskQuery inQuery, [FromServices] IRepository _commonDocumentRepository, [FromServices] IDictionaryService _dictionaryService, + [FromServices] IRepository _trialReadingQuestionRepository, + [FromServices] IRepository _trialReadingTableQuestionRepository, [FromServices] IRepository _trialRepository) { + var trialId = inQuery.TrialId; + var trialReadingCriterionId = inQuery.TrialReadingCriterionId; //每次查询必须是单标准的 - var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.IsGlobalReading, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync(); + var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionGroup, t.IsGlobalReading, t.IsArbitrationReading, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync(); var query = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsAnalysisCreate == false && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)) @@ -2073,18 +2202,28 @@ namespace IRaCIS.Core.Application.Service.Common var list = new List(); + var taskList = new List(); + #region 区分导表类型 + var removeColumnIndexList = new List() { }; + + if (inQuery.ReadingExportType == ExportResult.DetailedTableOfAdjudicationResults || + inQuery.ReadingExportType == ExportResult.DetailedTableOfAssessmentResults || + inQuery.ReadingExportType == ExportResult.DetailedTableOfLesions || + inQuery.ReadingExportType == ExportResult.TableOfAssessmentResults) + { + if (!criterion.IsArbitrationReading) + { + //仲裁阅片 才有裁判阅片明细表 同时要把模板里面的三列给去掉 + removeColumnIndexList = new List() { 6, 7, 8 }; + } + } + var export_Template = StaticData.Export.CommonReading_Export; if (inQuery.ReadingExportType == ExportResult.DetailedTableOfAdjudicationResults) { - //R1 R2 两个人的访视都阅片完成了才可以,去除只有一个人阅片完成的访视 - - //找到只有一个人阅片的受试者 和访视 - var exceptVisit = list.GroupBy(t => new { t.SubjectCode, t.TaskName }).Where(g => g.Count() == 1).Select(g => new { g.Key.SubjectCode, g.Key.TaskName }).ToList(); - list = list.Where(t => !exceptVisit.Any(ev => ev.SubjectCode == t.SubjectCode && ev.TaskName == t.TaskName)).ToList(); - //裁判明表 export_Template = StaticData.Export.CommonJudgeReadingDetail_Export; } @@ -2097,12 +2236,32 @@ namespace IRaCIS.Core.Application.Service.Common { //病灶明细表 export_Template = StaticData.Export.ReadingLession_Export; + } + else if (inQuery.ReadingExportType == ExportResult.TableOfAssessmentResults) + { + //阅片结果表 + export_Template = StaticData.Export.CommonReading_Export; + } + else if (inQuery.ReadingExportType == ExportResult.OCT_ReadingLession_Export) + { + //OCT + export_Template = StaticData.Export.OCT_ReadingLession_Export; + } + else + { + //CDISC + export_Template = StaticData.Export.CDISC_Reading_Export; } - //病灶明细表 需要单独处理 - if (inQuery.ReadingExportType != ExportResult.DetailedTableOfLesions && inQuery.ReadingExportType != ExportResult.OCT_ReadingLession_Export) + // 肿瘤标准 按照任务级别 + if ((inQuery.ReadingExportType == ExportResult.TableOfAssessmentResults || + inQuery.ReadingExportType == ExportResult.DetailedTableOfAssessmentResults || + inQuery.ReadingExportType == ExportResult.DetailedTableOfAdjudicationResults) && + (criterion.CriterionGroup == CriterionGroup.Tumor) + ) + { //其他可以统一处理 list = await query.ProjectTo(_mapper.ConfigurationProvider, @@ -2114,222 +2273,486 @@ namespace IRaCIS.Core.Application.Service.Common trialReadingCriterionId = inQuery.TrialReadingCriterionId, isEn_Us = _userInfo.IsEn_Us }).ToListAsync(); + } - else + //肿瘤标准 病灶明细表 按照病灶级别 (OCT 暂时不删除,先看是否能覆盖) + else if ( + (inQuery.ReadingExportType == ExportResult.DetailedTableOfLesions && + criterion.CriterionGroup == CriterionGroup.Tumor + ) || inQuery.ReadingExportType == ExportResult.OCT_ReadingLession_Export + ) { - //病灶明细表 - if (inQuery.ReadingExportType == ExportResult.OCT_ReadingLession_Export) + + taskList = await query.ProjectTo(_mapper.ConfigurationProvider, + new { - export_Template = StaticData.Export.OCT_ReadingLession_Export; - } + readingExportType = inQuery.ReadingExportType, + criterionType = criterion.CriterionType, + arbitrationRule = criterion.ArbitrationRule, + trialReadingCriterionId = inQuery.TrialReadingCriterionId, + isEn_Us = _userInfo.IsEn_Us + }).ToListAsync(); - var taskList = await query.ProjectTo(_mapper.ConfigurationProvider, - new - { - readingExportType = inQuery.ReadingExportType, - criterionType = criterion.CriterionType, - arbitrationRule = criterion.ArbitrationRule, - trialReadingCriterionId = inQuery.TrialReadingCriterionId, - isEn_Us = _userInfo.IsEn_Us - }).ToListAsync(); + } + // 非肿瘤标准 包括自定义,以及系统非肿瘤 会配置到表格层级 问题名称是 表格名称_表格子问题名 + else if ( + criterion.CriterionGroup == CriterionGroup.Nontumorous && inQuery.ReadingExportType != ExportResult.CDISC + ) + { - //动态列,以不同的病灶配置的问题取并集 - var lessionAnserList = taskList.Where(t => t.LesionList.Count() > 0).FirstOrDefault()?.LesionList.FirstOrDefault()?.LessionAnswerList ?? new List(); + // 配置在外层问题 或者表格问题上 + taskList = await query.ProjectTo(_mapper.ConfigurationProvider, + new + { + readingExportType = inQuery.ReadingExportType, + criterionType = criterion.CriterionType, + arbitrationRule = criterion.ArbitrationRule, + trialReadingCriterionId = inQuery.TrialReadingCriterionId, + isEn_Us = _userInfo.IsEn_Us + }).ToListAsync(); - var dynamicExtraAddTitleList = new List(); - - if (lessionAnserList.Count() > 0) - { - var lessionInfo = lessionAnserList.First(); - - if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB - || criterion.CriterionType == CriterionType.IRECIST1Point1 || criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) - { - dynamicExtraAddTitleList.Add(new DymamicQuestionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion ID" : "病灶编号" }); - dynamicExtraAddTitleList.Add(new DymamicQuestionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型" }); - } - else if (criterion.CriterionType == CriterionType.PCWG3) - { - dynamicExtraAddTitleList.Add(new DymamicQuestionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型" }); - } - - } - - //通过问题标识取并集 - - var dynamicLessionTitleList = lessionAnserList.Select(t => new DymamicQuestionInfo { QuestionMark = t.QuestionMark, QuestionName = t.QuestionName, TranslateDicName = t.TranslateDicName }).Distinct(); - var dynamicTitleList = dynamicExtraAddTitleList.Union(dynamicLessionTitleList).ToList(); - - //最终的病灶列表 要把裁判的也要加进去 - list = new List(); - - - foreach (var item in taskList.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum)) - { - if (item.LesionList.Count > 0) - { - foreach (var lession in item.LesionList.OrderBy(t => t.LessionType).ThenBy(t => t.LessionCode)) - { - var firstLessionAnser = lession.LessionAnswerList.FirstOrDefault() ?? new CommonLessionQuestionAnswerInfo(); - - var addLessionInfoList = new List(); - - if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB - || criterion.CriterionType == CriterionType.IRECIST1Point1 || criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) - { - //病灶编号 和病灶类型没有配置,但是需要有的 - addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion ID" : "病灶编号", QuestionValue = firstLessionAnser.LessionCode }); - addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = firstLessionAnser.LessionType, TranslateDicName = "LesionType" }); - - } - else if (criterion.CriterionType == CriterionType.PCWG3) - { - addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = firstLessionAnser.LessionType, TranslateDicName = "LesionType" }); - } - - - var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName }); - - - //有三部分组成 外层问题+ 没有配置病灶编号和类型+ 动态的表格问题 - var dynamicLessionInfoList = addLessionInfoList.Union(dynamicPartialLessionInfoList).Union(item.QuestionAnswerList).ToList(); - - //OCT 多个表格,但是只导出一个表格,有的问题答案就是空的 - if (dynamicLessionInfoList.Count > 0) - { - - var cloneItem = item.Clone(); - cloneItem.QuestionAnswerList = dynamicLessionInfoList; - - list.Add(cloneItem); - } - - } - } - else - { - //要把裁判任务加进去 裁判任务上没有病灶 - - list.Add(item); - } - - - - - } + } + // CDISC 导出 只管到 外层问题层级 和阅片结果表是保持一致 + else if (inQuery.ReadingExportType == ExportResult.CDISC) + { + list = await query.ProjectTo(_mapper.ConfigurationProvider, + new + { + readingExportType = inQuery.ReadingExportType, + criterionType = criterion.CriterionType, + arbitrationRule = criterion.ArbitrationRule, + trialReadingCriterionId = inQuery.TrialReadingCriterionId, + isEn_Us = _userInfo.IsEn_Us + }).ToListAsync(); } #endregion + + + + var dynamicColumnConfig = new DynamicColumnConfig(); + + //查询配置的问题名称,不是从答案表中连接取问题名称,因为目前有些保存,有些问题,虽然配置了,但是没填,导致导表有些配置的列没出来 + var trialConfigQuestionList = _trialReadingQuestionRepository.Where(t => t.TrialId == trialId && t.ReadingQuestionCriterionTrialId == trialReadingCriterionId).Where(t => t.ExportResultStr.Contains(((int)inQuery.ReadingExportType).ToString())).OrderBy(t => t.ShowOrder).Select(t => new ExportQuestionBasicInfo() + { + QuestionId = t.Id, + QuestionType = t.QuestionType, + TableName = "", + QuestionName = _userInfo.IsEn_Us ? t.QuestionEnName : t.QuestionName, + CDISCCode = t.CDISCCode, + TranslateDicName = t.DictionaryCode + }).ToList(); + + + if (inQuery.ReadingExportType != ExportResult.CDISC) + { + //最终EXCEL 列 + var configCoumNameList = new List(); + + //最终翻译字典 + var translateDicNameList = new List(); + + + //表格全问题名 + var trialConfigTableQuestionList = _trialReadingTableQuestionRepository.Where(t => t.TrialId == trialId && t.TrialCriterionId == trialReadingCriterionId).Where(t => t.ExportResultStr.Contains(((int)inQuery.ReadingExportType).ToString())) + .OrderBy(t => t.ShowOrder).Select(t => new ExportQuestionBasicInfo() + { + QuestionId = t.Id, + TableName = _userInfo.IsEn_Us ? t.ReadingQuestionTrial.QuestionEnName : t.ReadingQuestionTrial.QuestionName, + QuestionName = _userInfo.IsEn_Us ? t.QuestionEnName : t.QuestionName, + CDISCCode = t.CDISCCode, + TranslateDicName = t.DictionaryCode + }).ToList(); + + #region 外层问题 可能存在合并 + + var fistLeveLNameList = new List(); + + //肿瘤评估,非CDISC 导出 + if (criterion.CriterionGroup == CriterionGroup.Tumor) + { + if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB || criterion.CriterionType == CriterionType.IRECIST1Point1) + { + + fistLeveLNameList = trialConfigQuestionList.Select(t => + (t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.Tumor) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName).Distinct().ToList(); + + + + + } + else if (criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) + { + fistLeveLNameList = trialConfigQuestionList.Select(t => + (t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.ImgOncology) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName).Distinct().ToList(); + + } + else if (criterion.CriterionType == CriterionType.PCWG3) + { + fistLeveLNameList = trialConfigQuestionList.Select(t => t.QuestionName).ToList(); + } + + var exTralDicNameList = new List() { "LesionType" }; + + translateDicNameList = trialConfigQuestionList.Union(trialConfigTableQuestionList).Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Union(exTralDicNameList).Distinct().ToList(); + } + else + //非肿瘤评估,非CDISC 导出 + { + fistLeveLNameList = trialConfigQuestionList.Select(t => t.QuestionName).ToList(); + + translateDicNameList = trialConfigQuestionList.Union(trialConfigTableQuestionList).Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList(); + + } + + #endregion + + #region 表格问题 处理增加列 + + //肿瘤 表格问题直接去重、同时添加一些列 外层问题合并一些列 + if (criterion.CriterionGroup == CriterionGroup.Tumor) + { + var extralNameList = new List() { }; + + if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB + || criterion.CriterionType == CriterionType.IRECIST1Point1 || criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) + { + + //if(inQuery.ReadingExportType == ExportResult.DetailedTableOfLesions) + { + extralNameList.Add(_userInfo.IsEn_Us ? "Lesion ID" : "病灶编号"); + extralNameList.Add(_userInfo.IsEn_Us ? "Lesion Type" : "病灶类型"); + } + + } + else if (criterion.CriterionType == CriterionType.PCWG3) + { + //if (inQuery.ReadingExportType == ExportResult.DetailedTableOfLesions) + { + extralNameList.Add(_userInfo.IsEn_Us ? "Lesion Type" : "病灶类型"); + + } + } + + //肿瘤评估标准目前是去重 + var tableQuestionNameList = trialConfigTableQuestionList.Select(t => t.QuestionName).Distinct().ToList(); + + //有表格问题 那么就是三部分,否则就是外层问题 + configCoumNameList = tableQuestionNameList.Count == 0 ? fistLeveLNameList : fistLeveLNameList.Union(extralNameList).Union(tableQuestionNameList).ToList(); + + + #region 扩展病灶 + + + //最终的病灶列表 要把裁判的也要加进去,需要处理裁判标记 + + foreach (var item in taskList.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum)) + { + if (item.LesionList.Count > 0) + { + foreach (var lession in item.LesionList.OrderBy(t => t.LessionType).ThenBy(t => t.LessionCode)) + { + + var addLessionInfoList = new List(); + + if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB + || criterion.CriterionType == CriterionType.IRECIST1Point1 || criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) + { + //病灶编号 和病灶类型没有配置,但是需要有的 + addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion ID" : "病灶编号", QuestionValue = lession.LessionCode }); + addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = lession.LessionType, TranslateDicName = "LesionType" }); + + } + else if (criterion.CriterionType == CriterionType.PCWG3) + { + addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = lession.LessionType, TranslateDicName = "LesionType" }); + } + + var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName }); + + //有三部分组成 外层问题+ 没有配置病灶编号和类型+ 动态的表格问题 + var dynamicLessionInfoList = item.QuestionAnswerList.Union(addLessionInfoList).Union(dynamicPartialLessionInfoList).ToList(); + + //OCT 多个表格,但是只导出一个表格,有的问题答案就是空的 + if (dynamicLessionInfoList.Count > 0) + { + + var cloneItem = item.Clone(); + cloneItem.QuestionAnswerList = dynamicLessionInfoList; + + list.Add(cloneItem); + } + + } + } + else + { + //要把裁判任务加进去 裁判任务上没有病灶 + + list.Add(item); + } + } + + #endregion + + #region 不管是list 还是taskList 最终处理的数据都是list 处理好数据后合并 + if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB || criterion.CriterionType == CriterionType.IRECIST1Point1) + { + //针对1.1 整体肿瘤评估 有的两列要合并一列 + foreach (var item in list) + { + //处理合并表头 + + var questionType = item.IsBaseline == true ? QuestionType.ExistDisease : QuestionType.Tumor; + + var findItem = item.QuestionAnswerList.Where(t => t.QuestionType == questionType).FirstOrDefault(); + + if (findItem != null) + { + findItem.QuestionName = _userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估"; + } + + + if (item.IsBaseline == true) + { + item.QuestionAnswerList = item.QuestionAnswerList.Where(t => t.QuestionType != QuestionType.Tumor).ToList(); + } + else + { + item.QuestionAnswerList = item.QuestionAnswerList.Where(t => t.QuestionType != QuestionType.ExistDisease).ToList(); + } + } + } + else if (criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) + { + foreach (var item in list) + { + //处理合并表头 + + var questionType = item.IsBaseline == true ? QuestionType.ExistDisease : QuestionType.ImgOncology; + + var findItem = item.QuestionAnswerList.Where(t => t.QuestionType == questionType).FirstOrDefault(); + + if (findItem != null) + { + findItem.QuestionName = _userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估"; + } + + if (item.IsBaseline == true) + { + item.QuestionAnswerList = item.QuestionAnswerList.Where(t => t.QuestionType != QuestionType.ImgOncology).ToList(); + } + else + { + item.QuestionAnswerList = item.QuestionAnswerList.Where(t => t.QuestionType != QuestionType.ExistDisease).ToList(); + } + } + } + + #endregion + + } + //非肿瘤的 问题名称是 表格名称_表格子问题名 + else + { + + var isMutiTable = trialConfigTableQuestionList.Select(t => t.TableName).Distinct().Count() > 1; + + //多表格问题 + if (isMutiTable) + { + var extralNameList = new List() { _userInfo.IsEn_Us ? "Table Name" : "表格名称" }; + + var tableQuestionNameList = trialConfigTableQuestionList.Select(t => t.TableName + "_" + t.QuestionName).ToList(); + + configCoumNameList = fistLeveLNameList.Union(extralNameList).Union(tableQuestionNameList).ToList(); + } + else + { + //单表格问题(直接用表格问题名称) 或者没有表格问题 + + var tableNameList = trialConfigTableQuestionList.Select(t => t.QuestionName).Distinct().ToList(); + + configCoumNameList = fistLeveLNameList.Union(tableNameList).ToList(); + } + + + + + #region 扩展病灶 + + + //最终的病灶列表 要把裁判的也要加进去,需要处理裁判标记 + foreach (var item in taskList.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum)) + { + //有病灶,并且至少配置了一个病灶问题 + if (item.LesionList.Count > 0 && item.LesionList.SelectMany(t => t.LessionAnswerList).Any()) + { + foreach (var lession in item.LesionList.OrderBy(t => t.LessionType).ThenBy(t => t.LessionCode)) + { + //病灶配置了问题 才进行导出 + if (lession.LessionAnswerList.Count > 0) + { + var firstLessionAnser = lession.LessionAnswerList.FirstOrDefault(); + + var dynamicLessionInfoList = new List(); + + if (isMutiTable) + { + var addLessionInfoList = new List(); + + addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Table Name" : "表格名称", QuestionValue = firstLessionAnser.TableName }); + + var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.TableName + "_" + t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode }); + + //有三部分组成 外层问题+ 固定列表格名称 + 动态的表格问题 + dynamicLessionInfoList = item.QuestionAnswerList.Union(addLessionInfoList).Union(dynamicPartialLessionInfoList).ToList(); + } + else + { + var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode }); + + //两部分组成 外层问题+ 动态的表格问题 + dynamicLessionInfoList = item.QuestionAnswerList.Union(dynamicPartialLessionInfoList).ToList(); + } + + + + var cloneItem = item.Clone(); + cloneItem.QuestionAnswerList = dynamicLessionInfoList; + list.Add(cloneItem); + } + + } + } + else + { + //要把裁判任务加进去 裁判任务上没有病灶 + + list.Add(item); + } + + } + + #endregion + + } + + + #endregion + + dynamicColumnConfig = new DynamicColumnConfig() + { + AutoColumnTitleRowIndex = 2, + AutoColumnStartIndex = 6, + TempalteLastColumnIndex = 8, + DynamicItemDicName = "TranslateDicName", + DynamicItemValueName = "QuestionValue", + DynamicItemTitleName = "QuestionName", + DynamicListName = "QuestionAnswerList", + RemoveColunmIndexList = removeColumnIndexList, + ColumnNameList = configCoumNameList, + TranslateDicNameList = translateDicNameList + }; + + + + } + + else + { + //CDISC 导出 只到外层问题级别 + + var totalConfigCoumNameList = trialConfigQuestionList.ToList(); + + var configCoumNameList = totalConfigCoumNameList.Select(t => t.QuestionName).ToList(); + + var translateDicList = totalConfigCoumNameList.Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList(); + + var cdiscCodeList = totalConfigCoumNameList.Select(t => t.CDISCCode).ToList(); + + + dynamicColumnConfig = new DynamicColumnConfig() + { + AutoColumnTitleRowIndex = 1, + AutoColumnStartIndex = 6, + TempalteLastColumnIndex = 10, + DynamicItemDicName = "TranslateDicName", + DynamicItemValueName = "QuestionValue", + DynamicItemTitleName = "QuestionName", + DynamicListName = "QuestionAnswerList", + RemoveColunmIndexList = removeColumnIndexList, + ColumnNameList = configCoumNameList, + CDISCList = cdiscCodeList, + TranslateDicNameList = translateDicList + }; + + + + + } + + + #region 最终导出参数处理 + + if (inQuery.ReadingExportType == ExportResult.DetailedTableOfAdjudicationResults) + { + //R1 R2 两个人的访视都阅片完成了才可以,去除只有一个人阅片完成的访视 + //找到只有一个人阅片的受试者 和访视 + var exceptVisit = list.Where(t => t.ReadingCategory == ReadingCategory.Visit) + .GroupBy(t => new { t.SubjectCode, t.TaskName}).Where(g => g.Count() == 1).Select(g => new { g.Key.SubjectCode, g.Key.TaskName }).ToList(); + + list = list.Where(t => !exceptVisit.Any(ev => ev.SubjectCode == t.SubjectCode && ev.TaskName == t.TaskName)).ToList(); + + } + list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum).ToList(); - - var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException(); - exportInfo.CriterionName = criterion.CriterionName; - //处理裁判标记 list = DealJudgeMark(criterion.ArbitrationRule, criterion.IsGlobalReading, list); - - #region 系统标准处理整体肿瘤评估合并 - - var translateDicNameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList(); - - - //针对1.1 整体肿瘤评估 有的两列要合并一列 - if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB || criterion.CriterionType == CriterionType.IRECIST1Point1) - { - foreach (var item in list) - { - //处理合并表头 - - var questionType = item.IsBaseline == true ? QuestionType.ExistDisease : QuestionType.Tumor; - - var findItem = item.QuestionAnswerList.Where(t => t.QuestionType == questionType).FirstOrDefault(); - - if (findItem != null) - { - findItem.QuestionName = _userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估"; - } - - - if (item.IsBaseline == true) - { - item.QuestionAnswerList = item.QuestionAnswerList.Where(t => t.QuestionType != QuestionType.Tumor).ToList(); - } - else - { - item.QuestionAnswerList = item.QuestionAnswerList.Where(t => t.QuestionType != QuestionType.ExistDisease).ToList(); - } - } - } - else if (criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) - { - - foreach (var item in list) - { - //处理合并表头 - - var questionType = item.IsBaseline == true ? QuestionType.ExistDisease : QuestionType.ImgOncology; - - var findItem = item.QuestionAnswerList.Where(t => t.QuestionType == questionType).FirstOrDefault(); - - if (findItem != null) - { - findItem.QuestionName = _userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估"; - } - - if (item.IsBaseline == true) - { - item.QuestionAnswerList = item.QuestionAnswerList.Where(t => t.QuestionType != QuestionType.ImgOncology).ToList(); - } - else - { - item.QuestionAnswerList = item.QuestionAnswerList.Where(t => t.QuestionType != QuestionType.ExistDisease).ToList(); - } - } - } - else if (criterion.CriterionType == CriterionType.PCWG3) - { - - } - - var columNameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.QuestionName.IsNotNullOrEmpty()).Select(t => t.QuestionName).Distinct().ToList(); - - #endregion - + //裁判阅片明细表 if (export_Template == StaticData.Export.CommonJudgeReadingDetail_Export) { //裁判产生标记为空的数据过滤掉 list = list.Where(t => t.IsTrigerJudge != null).ToList(); } - exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId); + + + var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException(); + exportInfo.CriterionName = criterion.CriterionName; + exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId); - var dynamicColumnConfig = new DynamicColumnConfig() + exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId); + + + MemoryStream? memoryStream = null; + + string fileName = ""; + + if (inQuery.ReadingExportType == ExportResult.CDISC) { - AutoColumnTitleRowIndex = 2, - AutoColumnStartIndex = 6, - TempalteLastColumnIndex = 8, - DynamicItemDicName = "TranslateDicName", - DynamicItemValueName = "QuestionValue", - DynamicItemTitleName = "QuestionName", - DynamicListName = "QuestionAnswerList", - RemoveColunmIndexList = new List() { }, - ColumnNameList = columNameList ?? new List(), - TranslateDicNameList = translateDicNameList ?? new List() - }; + (memoryStream, fileName) = await ExcelExportHelper.CDISC_DataExport_Async(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig); + } + else + { + (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig); - var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig); + } return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileDownloadName = $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}_{fileName}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx" }; + + #endregion + } @@ -2579,9 +3002,9 @@ namespace IRaCIS.Core.Application.Service.Common { if (filteredList.Any(t => t.DoctorUserId == doctor.DoctorUserId)) { - doctor.TotalJudgeCount= filteredList.Where(t=>t.DoctorUserId==doctor.DoctorUserId).Count(); + doctor.TotalJudgeCount = filteredList.Where(t => t.DoctorUserId == doctor.DoctorUserId).Count(); - doctor.JudgeAgreeCount= filteredList.Where(t => t.DoctorUserId == doctor.DoctorUserId).Count(t => t.JudgeResultTaskId == t.VisitTaskId); + doctor.JudgeAgreeCount = filteredList.Where(t => t.DoctorUserId == doctor.DoctorUserId).Count(t => t.JudgeResultTaskId == t.VisitTaskId); } } diff --git a/IRaCIS.Core.Application/Service/Common/InternationalizationService.cs b/IRaCIS.Core.Application/Service/Common/InternationalizationService.cs index f7d6a38b0..809aa0dd0 100644 --- a/IRaCIS.Core.Application/Service/Common/InternationalizationService.cs +++ b/IRaCIS.Core.Application/Service/Common/InternationalizationService.cs @@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Service /// [ApiExplorerSettings(GroupName = "Common")] public class InternationalizationService(IRepository _internationalizationRepository, - IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IInternationalizationService + IMapper _mapper, IRepository _publishLogRepository, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IInternationalizationService { @@ -61,6 +61,8 @@ namespace IRaCIS.Core.Application.Service [AllowAnonymous] public async Task BatchAddOrUpdateFrontInternationalization(List batchList) { + var result = (await _publishLogRepository.Where(t => t.IsCurrentVersion == true).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException(); + foreach (var item in batchList) { var find = await _internationalizationRepository.FirstOrDefaultAsync(t => t.Code == item.Code && t.Description == item.Description && t.InternationalizationType == 0); @@ -71,13 +73,21 @@ namespace IRaCIS.Core.Application.Service } else { + + var frontState = item.State == null ? 0 : (int)item.State; + var mapItem = _mapper.Map(item); mapItem.InternationalizationType = 0; // 0 是预翻译 1是已确认 2是后端废弃 - mapItem.State = 0; + mapItem.State = frontState; - await _internationalizationRepository.AddAsync(mapItem); + find = await _internationalizationRepository.AddAsync(mapItem); + } + + if (find.PublishLogId == null || find.PublishLogId == Guid.Empty) + { + find.PublishLogId = result.Id; } } await _internationalizationRepository.SaveChangesAsync(); diff --git a/IRaCIS.Core.Application/Service/Common/MailService.cs b/IRaCIS.Core.Application/Service/Common/MailService.cs index 2d0fe9a98..cea87baf2 100644 --- a/IRaCIS.Core.Application/Service/Common/MailService.cs +++ b/IRaCIS.Core.Application/Service/Common/MailService.cs @@ -1,6 +1,7 @@ using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Application.Helper; +using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infrastructure; using MailKit; @@ -29,11 +30,11 @@ namespace IRaCIS.Core.Application.Service Task AdminResetPwdSendEmailAsync(Guid userId, string pwdNotMd5 = "123456"); - Task SiteSurveyUserJoinEmail(Guid trialId, Guid userId, string baseUrl, string rootUrl); + Task SiteSurveyUserJoinEmail(Guid trialId, Guid userId, string userTypes, string baseUrl, string rootUrl); - Task ExternalUserJoinEmail(Guid trialId, Guid userId, string baseUrl, string rootUrl); + Task ExternalUserJoinEmail(Guid trialId, Guid userId, string userTypes, string baseUrl, string rootUrl); - Task DoctorJoinTrialEmail(Guid trialId, Guid doctorId, string baseUrl, string rootUrl); + Task<(Guid identityUserId, Guid userRoleId)> DoctorJoinTrialEmail(Guid trialId, Guid doctorId, string baseUrl, string rootUrl); Task UserFeedBackMail(Guid feedBackId); } @@ -42,7 +43,9 @@ namespace IRaCIS.Core.Application.Service IRepository _systemBasicDatarepository, IRepository _visitTaskRepository, IRepository _trialSiteRepository, - IRepository _userRepository, + IRepository _userRoleRepository, + IRepository _userLogRepository, + IRepository _identityUserRepository, IRepository _userFeedBackRepository, ITokenService _tokenService, IRepository _subjectVisitRepository, @@ -169,83 +172,11 @@ namespace IRaCIS.Core.Application.Service await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle); } - //用户重置邮箱 - public async Task SendMailEditEmail(Guid userId, string userName, string emailAddress, int verificationCode) - { - - var messageToSend = new MimeMessage(); - //发件地址 - messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail)); - //收件地址 - messageToSend.To.Add(new MailboxAddress(userName, emailAddress)); - //主题 - //---[来自展影IRC] 关于重置邮箱的提醒 - - var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN; - - Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input => - { - var topicStr = string.Format(input.topicStr, companyName); - - var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), - - userName, - //---您正在进行邮箱重置操作 - verificationCode - ); - - return (topicStr, htmlBodyStr); - }; - - - await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc); - - - var sucessHandle = GetEmailSuccessHandle(userId, verificationCode, emailAddress); - - await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle); - - - } - //不登录 通过邮箱重置密码 - public async Task AnolymousSendEmailForResetAccount(string emailAddress, int verificationCode) - { - var messageToSend = new MimeMessage(); - //发件地址 - messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail)); - //收件地址 - messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress)); - var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN; - - Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input => - { - var topicStr = string.Format(input.topicStr, companyName); - - var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), - - "Sir/Madam", - //---您正在进行邮箱重置密码操作 - verificationCode - ); - - return (topicStr, htmlBodyStr); - }; - - - await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UnloginUseEmailResetPassword, messageToSend, emailConfigFunc); - - ////此时不知道用户 - var sucessHandle = GetEmailSuccessHandle(Guid.Empty, verificationCode, emailAddress); - - - await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle); - } - /// /// Reviewer简历录入 发送验证码 /// @@ -333,12 +264,13 @@ namespace IRaCIS.Core.Application.Service } + #region 邮件已修改 //添加用户发送邮件 public async Task AddUserSendEmailAsync(Guid userId, string baseUrl, string routeUrl) { - var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException(); + var sysUserInfo = (await _identityUserRepository.Where(t => t.Id == userId).Include(t => t.UserRoleList).ThenInclude(c => c.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException(); var messageToSend = new MimeMessage(); @@ -350,11 +282,11 @@ namespace IRaCIS.Core.Application.Service //---[来自展影IRC] 关于创建账户的提醒 - var token = _tokenService.GetToken(IRaCISClaims.Create(_mapper.Map(sysUserInfo))); + var token = _tokenService.GetToken(new UserTokenInfo() { IdentityUserId = sysUserInfo.Id }); - await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token }); + await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new IdentityUser() { EmailToken = token }); - routeUrl = routeUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token; + routeUrl = routeUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token; var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login")); @@ -370,8 +302,8 @@ namespace IRaCIS.Core.Application.Service var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), sysUserInfo.FullName, - sysUserInfo.UserName, - sysUserInfo.UserTypeRole.UserTypeShortName, + sysUserInfo.EMail, + //string.Join(',', sysUserInfo.UserRoleList.Select(t => t.UserTypeRole.UserTypeShortName)), redirectUrl ); @@ -388,7 +320,7 @@ namespace IRaCIS.Core.Application.Service //管理员重置密码发送邮件 public async Task AdminResetPwdSendEmailAsync(Guid userId, string pwdNotMd5 = "123456") { - var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException(); + var sysUserInfo = (await _identityUserRepository.Where(t => t.Id == userId).Include(t => t.UserRoleList).ThenInclude(c => c.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException(); var messageToSend = new MimeMessage(); //发件地址 @@ -408,7 +340,7 @@ namespace IRaCIS.Core.Application.Service sysUserInfo.FullName, sysUserInfo.UserName, - sysUserInfo.UserTypeRole.UserTypeShortName, + //string.Join(',', sysUserInfo.UserRoleList.Select(t => t.UserTypeRole.UserTypeShortName)), pwdNotMd5 ); @@ -421,11 +353,148 @@ namespace IRaCIS.Core.Application.Service await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig); } + //用户重置邮箱 + public async Task SendMailEditEmail(Guid userId, string userName, string emailAddress, int verificationCode) + { + + var messageToSend = new MimeMessage(); + //发件地址 + messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail)); + //收件地址 + messageToSend.To.Add(new MailboxAddress(userName, emailAddress)); + //主题 + //---[来自展影IRC] 关于重置邮箱的提醒 + + var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN; + + Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input => + { + var topicStr = string.Format(input.topicStr, companyName); + + var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), + + userName, + //---您正在进行邮箱重置操作 + verificationCode + ); + + return (topicStr, htmlBodyStr); + }; + + + await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc); + + + var sucessHandle = GetEmailSuccessHandle(userId, verificationCode, emailAddress); + + await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle); + + + } + + + //不登录 通过邮箱重置密码 + public async Task AnolymousSendEmailForResetAccount(string emailAddress, int verificationCode) + { + var messageToSend = new MimeMessage(); + //发件地址 + messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail)); + //收件地址 + messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress)); + + + var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN; + + Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input => + { + var topicStr = string.Format(input.topicStr, companyName); + + var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), + + "Sir/Madam", + //---您正在进行邮箱重置密码操作 + verificationCode + ); + + return (topicStr, htmlBodyStr); + }; + + + await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UnloginUseEmailResetPassword, messageToSend, emailConfigFunc); + + ////此时不知道用户 + var sucessHandle = GetEmailSuccessHandle(Guid.Empty, verificationCode, emailAddress); + + + await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle); + } + + //外部用户 加入项目 + public async Task ExternalUserJoinEmail(Guid trialId, Guid userId, string userTypes, string baseUrl, string rootUrl) + { + var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId)).IfNullThrowException(); + + var sysUserInfo = (await _identityUserRepository.Where(t => t.Id == userId).FirstOrDefaultAsync()).IfNullThrowException(); + + var messageToSend = new MimeMessage(); + //发件地址 + messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail)); + //收件地址 + messageToSend.To.Add(new MailboxAddress(String.Empty, sysUserInfo.EMail)); + //主题 + // $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信"; + + + + var token = _tokenService.GetToken(new UserTokenInfo() { IdentityUserId = sysUserInfo.Id }); + if (sysUserInfo.IsFirstAdd) + { + await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new Domain.Models.IdentityUser() { EmailToken = token }); + } + + var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login")); + + var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token; + + var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}"; + + + var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN; + + Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input => + { + var topicStr = string.Format(input.topicStr, companyName, trialInfo.ResearchProgramNo); + + var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), + + sysUserInfo.FullName, + trialInfo.ExperimentName, + trialInfo.ResearchProgramNo, + trialInfo.TrialCode, + sysUserInfo.IsFirstAdd ? sysUserInfo.EMail : sysUserInfo.UserName, + userTypes, + sysUserInfo.IsFirstAdd ? redirectUrl : baseUrl + ); + + return (topicStr, htmlBodyStr); + }; + + + await GetEmailSubejctAndHtmlInfoAndBuildAsync(sysUserInfo.IsFirstAdd ? EmailBusinessScenario.SiteUseOrExternalUserFirstrJoinTrial : EmailBusinessScenario.SiteUserOrExternalUserExistJoinTrial, messageToSend, emailConfigFunc); + + + await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, null); + + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = userId, OptType = UserOptType.UpdateUserRole }, true); + + } //Site调研 用户加入项目 - public async Task SiteSurveyUserJoinEmail(Guid trialId, Guid userId, string baseUrl, string rootUrl) + public async Task SiteSurveyUserJoinEmail(Guid trialId, Guid userId, string userTypes, string baseUrl, string rootUrl) { - var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException(); + var sysUserInfo = (await _identityUserRepository.Where(t => t.Id == userId).FirstOrDefaultAsync()).IfNullThrowException(); + + var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId); @@ -438,14 +507,14 @@ namespace IRaCIS.Core.Application.Service // $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信"; - var token = _tokenService.GetToken(IRaCISClaims.Create(_mapper.Map(sysUserInfo))); + var token = _tokenService.GetToken(new UserTokenInfo() { IdentityUserId = sysUserInfo.Id }); if (sysUserInfo.IsFirstAdd) { - await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token }); + await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new Domain.Models.IdentityUser() { EmailToken = token }); } - var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token; + var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token; var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login")); @@ -464,8 +533,8 @@ namespace IRaCIS.Core.Application.Service trialInfo.ExperimentName, trialInfo.ResearchProgramNo, trialInfo.TrialCode, - sysUserInfo.UserName, - sysUserInfo.UserTypeRole.UserTypeShortName, + sysUserInfo.IsFirstAdd ? sysUserInfo.EMail : sysUserInfo.UserName, + userTypes, sysUserInfo.IsFirstAdd ? redirectUrl : baseUrl ); @@ -478,74 +547,19 @@ namespace IRaCIS.Core.Application.Service await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = userId, OptType = UserOptType.UpdateUserRole }, true); } - //外部用户 加入项目 - public async Task ExternalUserJoinEmail(Guid trialId, Guid userId, string baseUrl, string rootUrl) - { - var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId)).IfNullThrowException(); - var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException(); - - - var messageToSend = new MimeMessage(); - //发件地址 - messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail)); - //收件地址 - messageToSend.To.Add(new MailboxAddress(String.Empty, sysUserInfo.EMail)); - //主题 - // $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信"; - - - - var token = _tokenService.GetToken(IRaCISClaims.Create(_mapper.Map(sysUserInfo))); - if (sysUserInfo.IsFirstAdd) - { - await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token }); - } - - var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login")); - - var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token; - - var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}"; - - - var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN; - - Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input => - { - var topicStr = string.Format(input.topicStr, companyName, trialInfo.ResearchProgramNo); - - var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), - - sysUserInfo.FullName, - trialInfo.ExperimentName, - trialInfo.ResearchProgramNo, - trialInfo.TrialCode, - sysUserInfo.UserName, - sysUserInfo.UserTypeRole.UserTypeShortName, - sysUserInfo.IsFirstAdd ? redirectUrl : baseUrl - ); - - return (topicStr, htmlBodyStr); - }; - - - await GetEmailSubejctAndHtmlInfoAndBuildAsync(sysUserInfo.IsFirstAdd ? EmailBusinessScenario.SiteUseOrExternalUserFirstrJoinTrial : EmailBusinessScenario.SiteUserOrExternalUserExistJoinTrial, messageToSend, emailConfigFunc); - - - await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, null); - - } + #endregion //医生生成账号加入 或者已存在账号加入到项目中 - public async Task DoctorJoinTrialEmail(Guid trialId, Guid doctorId, string baseUrl, string rootUrl) + public async Task<(Guid identityUserId, Guid userRoleId)> DoctorJoinTrialEmail(Guid trialId, Guid doctorId, string baseUrl, string rootUrl) { var doctor = await _doctorTypeRepository.FindAsync(doctorId); - User sysUserInfo = new User(); + var sysUserInfo = new IdentityUser(); var userType = await _userTypeRepository.FirstAsync(t => t.UserTypeEnum == UserTypeEnum.IndependentReviewer); @@ -553,13 +567,13 @@ namespace IRaCIS.Core.Application.Service using (await @lock.AcquireAsync()) { - var isDoctorHaveAccount = await _userRepository.AnyAsync(t => t.DoctorId == doctorId); + var isDoctorHaveAccount = await _userRoleRepository.AnyAsync(t => t.DoctorId == doctorId || t.IdentityUser.EMail == doctor.EMail); if (!isDoctorHaveAccount) { - var saveItem = new User() { FirstName = doctor.FirstName, LastName = doctor.LastName, EMail = doctor.EMail }; + var saveItem = new IdentityUser() { FirstName = doctor.FirstName, LastName = doctor.LastName, EMail = doctor.EMail }; var trialType = await _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialType).FirstOrDefaultAsync(); @@ -569,31 +583,40 @@ namespace IRaCIS.Core.Application.Service } - saveItem.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1; + saveItem.Code = _identityUserRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1; - saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User)); + saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(IdentityUser)); - saveItem.UserName = saveItem.UserCode; + saveItem.UserRoleList = new List() { new UserRole() { DoctorId = doctorId, UserTypeEnum = UserTypeEnum.IndependentReviewer, UserTypeId = userType.Id } }; - saveItem.UserTypeEnum = UserTypeEnum.IndependentReviewer; - - saveItem.DoctorId = doctorId; - saveItem.UserTypeId = userType.Id; - - var savedUser = await _userRepository.AddAsync(saveItem); + var savedUser = await _identityUserRepository.AddAsync(saveItem); //下面获取Token 需要这部分信息 - sysUserInfo = savedUser.Clone(); - - sysUserInfo.UserTypeRole = userType; - - await _userRepository.SaveChangesAsync(); + sysUserInfo = savedUser; } else { - sysUserInfo = (await _userRepository.Where(t => t.DoctorId == doctorId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException(); + sysUserInfo = (await _identityUserRepository.Where(t => t.UserRoleList.Any(t => t.DoctorId == doctorId || t.IdentityUser.EMail == doctor.EMail), true).Include(t => t.UserRoleList).FirstOrDefaultAsync()).IfNullThrowException(); + + + var findRole = sysUserInfo.UserRoleList.FirstOrDefault(t => t.UserTypeId == userType.Id); + //不存在该角色,那么就加入该角色 + if (findRole == null) + { + sysUserInfo.UserRoleList.Add(new UserRole() { DoctorId = doctorId, UserTypeEnum = UserTypeEnum.IndependentReviewer, UserTypeId = userType.Id }); + } + else + { + findRole.IsUserRoleDisabled = false; + } + + sysUserInfo.Status = UserStateEnum.Enable; + } + + //保证能有userRoleId + await _userRoleRepository.SaveChangesAsync(); } @@ -607,20 +630,14 @@ namespace IRaCIS.Core.Application.Service - var basicInfo = IRaCISClaims.Create(_mapper.Map(sysUserInfo)); - - ////第一次添加的时候 注意赋值 - //basicInfo.PermissionStr = userType.PermissionStr; - //basicInfo.UserTypeShortName = userType.UserTypeShortName; - - var token = _tokenService.GetToken(basicInfo); + var token = _tokenService.GetToken(new UserTokenInfo() { IdentityUserId = sysUserInfo.Id }); if (sysUserInfo.IsFirstAdd) { - await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token }); + await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new Domain.Models.IdentityUser() { EmailToken = token }); } - var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + userType.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token; + var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token; var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login")); @@ -642,8 +659,8 @@ namespace IRaCIS.Core.Application.Service trialInfo.ExperimentName, trialInfo.ResearchProgramNo, trialInfo.TrialCode, - sysUserInfo.UserName, - userType.UserTypeShortName, + sysUserInfo.IsFirstAdd ? sysUserInfo.EMail : sysUserInfo.UserName, + $"{userType.UserTypeShortName} ({userType.UserTypeName})", sysUserInfo.IsFirstAdd ? redirectUrl : baseUrl ); @@ -656,7 +673,10 @@ namespace IRaCIS.Core.Application.Service await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, null); - return sysUserInfo.Id; + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = sysUserInfo.Id, OptType = UserOptType.UpdateUserRole }, true); + + + return (sysUserInfo.Id, sysUserInfo.UserRoleList.First(t => t.UserTypeEnum == UserTypeEnum.IndependentReviewer).Id); } @@ -664,7 +684,7 @@ namespace IRaCIS.Core.Application.Service public async Task UserFeedBackMail(Guid feedBackId) { - var feedBack = await _userFeedBackRepository.Where(t => t.Id == feedBackId).Include(t => t.CreateUser).ThenInclude(t => t.UserTypeRole).FirstNotNullAsync(); + var feedBack = await _userFeedBackRepository.Where(t => t.Id == feedBackId).Include(t => t.CreateUserRole.UserTypeRole).Include(t => t.CreateUserRole.IdentityUser).FirstNotNullAsync(); var messageToSend = new MimeMessage(); //发件地址 @@ -680,8 +700,8 @@ namespace IRaCIS.Core.Application.Service var userTypeEnumList = emailConfigInfo.EmailNoticeUserTypeList.Where(t => t.EmailUserType == EmailUserType.To).Select(t => t.UserType).ToList(); - var emailList = await _userRepository.Where(t => userTypeEnumList.Contains(t.UserTypeEnum) && - (isHaveTrialId ? t.UserTrials.Any(t => t.TrialId == feedBack.TrialId) : true)).Select(t => new { t.EMail, t.UserTypeEnum, t.FullName }).ToListAsync(); + var emailList = await _userRoleRepository.Where(t => userTypeEnumList.Contains(t.UserTypeEnum) && t.IsUserRoleDisabled == false && t.IdentityUser.Status == UserStateEnum.Enable && + (isHaveTrialId ? t.IdentityUser.UserTrialList.Any(t => t.TrialId == feedBack.TrialId && t.TrialUserRoleList.Any(c => userTypeEnumList.Contains(c.UserRole.UserTypeEnum))) : true)).Select(t => new { t.IdentityUser.EMail, t.UserTypeEnum, t.IdentityUser.FullName }).ToListAsync(); foreach (var email in emailList) @@ -709,8 +729,8 @@ namespace IRaCIS.Core.Application.Service info.TrialCode, info.SubejctCode, info.VisitName, - feedBack.CreateUser.UserTypeRole.UserTypeShortName, - feedBack.CreateUser.FullName, + feedBack.CreateUserRole.UserTypeRole.UserTypeShortName, + feedBack.CreateUserRole.IdentityUser.FullName, emailType, feedBack.QuestionDescription, _systemEmailConfig.SiteUrl @@ -739,8 +759,8 @@ namespace IRaCIS.Core.Application.Service info.TrialCode, info.SubejctCode, info.VisitName, - feedBack.CreateUser.UserTypeRole.UserTypeShortName, - feedBack.CreateUser.FullName, + feedBack.CreateUserRole.UserTypeRole.UserTypeShortName, + feedBack.CreateUserRole.IdentityUser.FullName, emailType, feedBack.QuestionDescription, _systemEmailConfig.SiteUrl @@ -768,8 +788,8 @@ namespace IRaCIS.Core.Application.Service var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), userNames, info.TrialCode, - feedBack.CreateUser.UserTypeRole.UserTypeShortName, - feedBack.CreateUser.FullName, + feedBack.CreateUserRole.UserTypeRole.UserTypeShortName, + feedBack.CreateUserRole.IdentityUser.FullName, emailType, feedBack.QuestionDescription, _systemEmailConfig.SiteUrl @@ -793,8 +813,8 @@ namespace IRaCIS.Core.Application.Service var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr), userNames, - feedBack.CreateUser.UserTypeRole.UserTypeShortName, - feedBack.CreateUser.FullName, + feedBack.CreateUserRole.UserTypeRole.UserTypeShortName, + feedBack.CreateUserRole.IdentityUser.FullName, feedBack.QuestionDescription, _systemEmailConfig.SiteUrl ); diff --git a/IRaCIS.Core.Application/Service/Common/PublishLogService.cs b/IRaCIS.Core.Application/Service/Common/PublishLogService.cs index ba0063066..8b4274faf 100644 --- a/IRaCIS.Core.Application/Service/Common/PublishLogService.cs +++ b/IRaCIS.Core.Application/Service/Common/PublishLogService.cs @@ -42,7 +42,7 @@ namespace IRaCIS.Core.Application.Service { Version version; - if (!Version.TryParse(addOrEditPublishLog.Version, out version)|| !Version.TryParse(addOrEditPublishLog.Version_US, out version)) + if (!Version.TryParse(addOrEditPublishLog.Version, out version)) { //"版本号不符合要求" return ResponseOutput.NotOk(_localizer["PublishLog_NotValidVersion"]); @@ -50,7 +50,7 @@ namespace IRaCIS.Core.Application.Service var verifyExp1 = new EntityVerifyExp() { - VerifyExp = u => u.Version == addOrEditPublishLog.Version || u.Version_US == addOrEditPublishLog.Version_US, + VerifyExp = u => u.Version == addOrEditPublishLog.Version , //"发布编号不能重复" VerifyMsg = _localizer["PublishLog_RepeatVersion"] diff --git a/IRaCIS.Core.Application/Service/Common/_MapConfig.cs b/IRaCIS.Core.Application/Service/Common/_MapConfig.cs index fca2fa4da..a1ae89f86 100644 --- a/IRaCIS.Core.Application/Service/Common/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Common/_MapConfig.cs @@ -98,9 +98,9 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUser.FullName)) - .ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUser.UserTypeEnum)) - .ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName)) + .ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUserRole.FullName)) + .ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUserRole.UserTypeEnum)) + .ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.UserName)) .ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode)); diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs index 9f8793b4b..42b4248f1 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs @@ -322,6 +322,35 @@ namespace IRaCIS.Application.Contracts /// public string WorkPartTimeEn { get; set; } = string.Empty; + /// + /// 大学 + /// + 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; } @@ -666,6 +695,55 @@ namespace IRaCIS.Application.Contracts /// public string WorkPartTimeEn { get; set; } = string.Empty; + /// + /// 大学 + /// + public string University { get; set; } = string.Empty; + + /// + /// 大学 + /// + public string UniversityCN { get; set; } = string.Empty; + + /// + /// 城市 + /// + public string City { get; set; } = string.Empty; + + /// + /// 城市 + /// + public string CityCN { get; set; } = string.Empty; + + /// + /// 医院 + /// + public string HospitalEn { get; set; } = string.Empty; + + /// + /// 医院 + /// + public string HospitalCN { get; set; } = string.Empty; + + /// + /// 大学 + /// + public string UniversityAffiliated { get; set; } = string.Empty; + + /// + /// 大学 + /// + public string UniversityAffiliatedCN { get; set; } = string.Empty; + + /// + /// 医院 + /// + public string HospitalName { get; set; } = string.Empty; + + /// + /// 医院 + /// + public string HospitalNameCN { get; set; } = string.Empty; } #endregion diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/EducationModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/EducationModel.cs index 734c4cbb4..0c2ded656 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/EducationModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/EducationModel.cs @@ -37,6 +37,7 @@ } public class PostgraduateCommand { + public Guid? Id { get; set; } public Guid DoctorId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs index 76384ac9b..b42df0107 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -17,6 +17,7 @@ namespace IRaCIS.Core.Application.Service IRepository _doctorDictionaryRepository, IRepository _doctorSummarizeRepository, IRepository _enrollRepository, + IRepository _hospitalRepository, IRepository _dictionaryRepository, IRepository _attachmentRepository, IRepository _emailNoticeConfigrepository, @@ -229,7 +230,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - public async Task AddOrUpdateGneralSituation(SummarizeInfoDto inDto) + public async Task<(DoctorSummarize,bool)> AddOrUpdateGneralSituation(SummarizeInfoDto inDto) { if (inDto.TrialId != null&&inDto.Id==null) { @@ -261,6 +262,7 @@ namespace IRaCIS.Core.Application.Service inDto.IndicationEn = "Default"; } var exists = await _doctorSummarizeRepository + .Where(x=> x.IndicationEn!=string.Empty && x.Indication!=string.Empty) .Where( x => x.IndicationEn == inDto.IndicationEn|| x.Indication == inDto.Indication) .AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null&&x.Id!=inDto.Id); @@ -319,7 +321,7 @@ namespace IRaCIS.Core.Application.Service var entity = await _doctorSummarizeRepository.InsertOrUpdateAsync(inDto, true); - return entity; + return (entity,true); } /// @@ -581,7 +583,7 @@ namespace IRaCIS.Core.Application.Service [HttpPost] - public async Task UpdateEmploymentInfo(EmploymentCommand doctorWorkInfoModel) + public async Task UpdateEmploymentInfo(EmploymentCommand inDto) { #region 废弃 //var success = _doctorRepository.Update(d => d.Id == doctorWorkInfoModel.Id, u => new Doctor() @@ -611,8 +613,7 @@ namespace IRaCIS.Core.Application.Service //var success = _doctorRepository.SaveChanges(); #endregion - - var entity = await _doctorRepository.InsertOrUpdateAsync(doctorWorkInfoModel, true); + var entity = await _doctorRepository.InsertOrUpdateAsync(inDto, true); return ResponseOutput.Ok(); @@ -721,7 +722,7 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task UpdateAuditResume(ResumeConfirmCommand auditResumeParam) { - var userId = _userInfo.Id; + var userId = _userInfo.UserRoleId; //判断 合作协议、正式简历 是否有。如果没有,显示提示信息,并且不能保存 var attachmentList = await _attachmentRepository.Where(u => u.DoctorId == auditResumeParam.Id) .Select(u => u.Type).ToListAsync(); diff --git a/IRaCIS.Core.Application/Service/Doctor/EducationService.cs b/IRaCIS.Core.Application/Service/Doctor/EducationService.cs index ad8d8a751..61455e7d1 100644 --- a/IRaCIS.Core.Application/Service/Doctor/EducationService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/EducationService.cs @@ -8,6 +8,7 @@ namespace IRaCIS.Core.Application.Service { [ApiExplorerSettings(GroupName = "Reviewer")] public class EducationService(IRepository _postgraduateRepository, + IRepository _hospitalRepository, IRepository _educationRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IEducationService { @@ -88,7 +89,7 @@ namespace IRaCIS.Core.Application.Service /// 添加/更新医生继续学习经历 [HttpPost] - public async Task AddOrUpdatePostgraduateInfo(PostgraduateCommand postgraduateViewModel) + public async Task AddOrUpdatePostgraduateInfo(PostgraduateCommand inDto) { #region 封装前 @@ -109,8 +110,7 @@ namespace IRaCIS.Core.Application.Service //} #endregion - - var entity = await _postgraduateRepository.InsertOrUpdateAsync(postgraduateViewModel, true); + var entity = await _postgraduateRepository.InsertOrUpdateAsync(inDto, true); return ResponseOutput.Ok(entity.Id); } /// diff --git a/IRaCIS.Core.Application/Service/Doctor/_MapConfig.cs b/IRaCIS.Core.Application/Service/Doctor/_MapConfig.cs index 1c89b276e..557a00058 100644 --- a/IRaCIS.Core.Application/Service/Doctor/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Doctor/_MapConfig.cs @@ -67,9 +67,9 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap(); - CreateMap() - .ForMember(t => t.Hospital, c => c.MapFrom(d => d.HospitalEnt.HospitalName)) - .ForMember(t => t.HospitalCN, c => c.MapFrom(d => d.HospitalEnt.HospitalNameCN)); + CreateMap(); + // .ForMember(t => t.Hospital, c => c.MapFrom(d => d.HospitalEnt.HospitalName)) + //.ForMember(t => t.HospitalCN, c => c.MapFrom(d => d.HospitalEnt.HospitalNameCN)); CreateMap(); CreateMap(); @@ -99,11 +99,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() ; - CreateMap() - .ForMember(d => d.UserTypeShortName, u => u.MapFrom(t => t.UserTypeRole.UserTypeShortName)) - .ForMember(d => d.Code, u => u.MapFrom(t => t.UserCode)) - .ForMember(d => d.PermissionStr, u => u.MapFrom(t => t.UserTypeRole.PermissionStr)) - .ForMember(d => d.RealName, u => u.MapFrom(user => string.IsNullOrEmpty(user.FirstName) ? user.LastName : user.LastName + " / " + user.FirstName)); + CreateMap(); CreateMap() .ForMember(x=>x.VisitReadingCount, u => u.MapFrom(t => (t.ExperienceDataType==ExperienceDataType.TrialAuto||t.ExperienceDataType==ExperienceDataType.SystemAuto)? @@ -116,15 +112,17 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.EvaluationCriteriaList, u => u.MapFrom(t => t.ExperienceCriteriaList.Select(t => t.EvaluationCriteria.Value))) .ForMember(d => d.EvaluationCriteriaIdList, u => u.MapFrom(t => t.ExperienceCriteriaList.Select(t => t.EvaluationCriteriaId))); - CreateMap() - .ForMember(d => d.Code, u => u.MapFrom(t => t.ReviewerCode)) - .ForMember(d => d.RealName, u => u.MapFrom(t => t.ChineseName)) - .ForMember(d => d.IsReviewer, u => u.MapFrom(t => true)) - .ForMember(d => d.UserName, u => u.MapFrom(doctor => doctor.LastName + " / " + doctor.FirstName)); + //CreateMap() + // .ForMember(d => d.Code, u => u.MapFrom(t => t.ReviewerCode)) + // .ForMember(d => d.RealName, u => u.MapFrom(t => t.ChineseName)) + // .ForMember(d => d.IsReviewer, u => u.MapFrom(t => true)) + // .ForMember(d => d.UserName, u => u.MapFrom(doctor => doctor.LastName + " / " + doctor.FirstName)); #region 医生基本信息 CreateMap() - .ForMember(d => d.DoctorUserName, u => u.MapFrom(t => t.User.UserName)); + .ForMember(d => d.DoctorUserName, u => u.MapFrom(t => t.UserRole.IdentityUser.UserName)); + + CreateMap().IncludeMembers(t => t.Hospital).Include() .ForMember(d => d.AccountUserName, u => u.MapFrom(s => s.EnrollList.Where(t => t.DoctorUserId != null).Select(c => c.DoctorUser.UserName).FirstOrDefault())) .ForMember(d => d.Department, u => u.MapFrom(s => s.Department.Value)) @@ -182,7 +180,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.IntoGroupState, u => u.MapFrom(s => s.EnrollStatus)) .ForMember(d => d.OptTime, u => u.MapFrom(s => s.CreateTime)) - .ForMember(d => d.OptUserName, u => u.MapFrom(s => s.CreateUser.UserName)); + .ForMember(d => d.OptUserName, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.UserName)); CreateMap().IncludeMembers(t => t.Doctor, t => t.Doctor.Hospital) .ForMember(o => o.DictionaryList, t => t.MapFrom(u => u.Doctor.DoctorDicRelationList.Where(t => t.KeyName == StaticData.ReadingType || t.KeyName == StaticData.Subspeciality).Select(t => t.Dictionary).OrderBy(t => t.ShowOrder))) diff --git a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs index dca4b6d69..9669388cf 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs @@ -3,6 +3,7 @@ // 生成时间 2022-01-05 09:17:10 // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 //-------------------------------------------------------------------- +using Newtonsoft.Json; using System.ComponentModel.DataAnnotations; namespace IRaCIS.Core.Application.Contracts @@ -38,6 +39,7 @@ namespace IRaCIS.Core.Application.Contracts public string ExperimentName { get; set; } + } @@ -56,8 +58,14 @@ namespace IRaCIS.Core.Application.Contracts public string RealName { get; set; } = string.Empty; - public Guid UserTypeId { get; set; } - public string UserTypeShortName { get; set; } = string.Empty; + public string DocTypeCode { get; set; } + + public List UserConfirmedUserTypeList => (DocNeedSignUserTypeList != null && IdentityUserTypeList != null) ? IdentityUserTypeList.Intersect(DocNeedSignUserTypeList).ToList() : new List(); + + + public IEnumerable IdentityUserTypeList { get; set; } + public IEnumerable DocNeedSignUserTypeList { get; set; } + } diff --git a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs index b0b9e02d9..2c436cb01 100644 --- a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs +++ b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs @@ -15,9 +15,9 @@ namespace IRaCIS.Core.Application.Service public class EmailSendService(IRepository _trialEmailNoticeConfigRepository, IRepository _trialRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _visitTaskRepository, - IRepository _trialSiteUserRepository, + IRepository _trialSiteUserRoleRepository, IOptionsMonitor _SystemEmailSendConfig, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IEmailSendService { @@ -144,7 +144,7 @@ namespace IRaCIS.Core.Application.Service var allUserTypeEnumList = toUserTypeEnumList.Union(copyUserTypeEnumList).Distinct().ToList(); - var allUserList = await _trialUserRepository.Where(t => t.TrialId == trialId && allUserTypeEnumList.Contains(t.User.UserTypeEnum)).Select(t => new { t.UserId, t.User.EMail, t.User.FullName, t.User.UserTypeEnum }).ToListAsync(); + var allUserList = await _trialUserRoleRepository.Where(t => t.TrialId == trialId && allUserTypeEnumList.Contains(t.UserRole.UserTypeEnum)).Select(t => new { t.UserId, t.UserRole.IdentityUser.EMail, t.UserRole.FullName, t.UserRole.UserTypeEnum }).ToListAsync(); var toUserList = allUserList.Where(t => toUserTypeEnumList.Contains(t.UserTypeEnum)) @@ -157,7 +157,7 @@ namespace IRaCIS.Core.Application.Service } if (trialSiteId != null && toUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA)) { - var curentSiteUserIdList = _trialSiteUserRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList(); + var curentSiteUserIdList = _trialSiteUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList(); toUserList = toUserList.Where(t => (t.UserTypeEnum != UserTypeEnum.CRA && t.UserTypeEnum != UserTypeEnum.ClinicalResearchCoordinator) || curentSiteUserIdList.Contains(t.UserId)).ToList(); } @@ -171,7 +171,7 @@ namespace IRaCIS.Core.Application.Service if (trialSiteId != null && copyUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA)) { - var curentSiteUserIdList = _trialSiteUserRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList(); + var curentSiteUserIdList = _trialSiteUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList(); copyUserList = copyUserList.Where(t => (t.UserTypeEnum != UserTypeEnum.CRA && t.UserTypeEnum != UserTypeEnum.ClinicalResearchCoordinator) || curentSiteUserIdList.Contains(t.UserId)).ToList(); } diff --git a/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs index 839017e20..e2ed0597b 100644 --- a/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs @@ -20,7 +20,7 @@ namespace IRaCIS.Core.Application.Contracts Task> GetTrialUserSelect(Guid trialId); - Task> GetTrialSystemDocumentList(DocumentTrialUnionQuery querySystemDocument); - List GetTrialUserDocumentList(Guid trialId); + //Task> GetTrialSystemDocumentList(DocumentTrialUnionQuery querySystemDocument); + //List GetTrialUserDocumentList(Guid trialId); } } \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs index 970ce6daa..34ec5ffd7 100644 --- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs @@ -6,7 +6,7 @@ using IRaCIS.Core.Application.Contracts; using Microsoft.AspNetCore.Mvc; -using User = IRaCIS.Core.Domain.Models.User; +using UserRole = IRaCIS.Core.Domain.Models.UserRole; namespace IRaCIS.Core.Application.Services { @@ -15,8 +15,9 @@ namespace IRaCIS.Core.Application.Services /// [ApiExplorerSettings(GroupName = "Trial")] public class SystemDocumentService(IRepository _systemDocumentRepository, - IRepository _userRepository, - IRepository _systemDocConfirmedUserRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISystemDocumentService + IRepository _userRoleRepository, + IRepository _identityUserRepository, + IRepository _systemDocConfirmedUserRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISystemDocumentService { @@ -35,7 +36,7 @@ namespace IRaCIS.Core.Application.Services .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) - .ProjectTo(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us, userId = _userInfo.Id }); + .ProjectTo(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us, userId = _userInfo.UserRoleId }); return await systemDocumentQueryable.ToPagedListAsync(inQuery); } @@ -109,7 +110,7 @@ namespace IRaCIS.Core.Application.Services await _systemDocumentRepository.UpdatePartialFromQueryAsync(systemDocumentId, u => new SystemDocument() { IsDeleted = true }); - await _systemDocConfirmedUserRepository.UpdatePartialFromQueryAsync(x => x.SystemDocumentId == systemDocumentId, x => new SystemDocConfirmedUser() + await _systemDocConfirmedUserRepository.UpdatePartialFromQueryAsync(x => x.SystemDocumentId == systemDocumentId, x => new SystemDocConfirmedIdentityUser() { IsDeleted = true }); @@ -146,15 +147,16 @@ namespace IRaCIS.Core.Application.Services var isInternal = _userInfo.IsZhiZhun; - var query = from sysDoc in _systemDocumentRepository.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + var query = from sysDoc in _systemDocumentRepository.AsQueryable(true) + .Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) - //外部人员 只签署 文档类型枚举值有值的 + //外部人员 只签署 外部需要签署的 .WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter) .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) - join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = _userInfo.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc + join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = _userInfo.IdentityUserId, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc from confirm in cc.DefaultIfEmpty() - join user in _userRepository.Where() on _userInfo.Id equals user.Id + join user in _identityUserRepository.Where() on _userInfo.IdentityUserId equals user.Id select new UnionDocumentWithConfirmInfoView() { @@ -173,15 +175,24 @@ namespace IRaCIS.Core.Application.Services ConfirmUserId = confirm.ConfirmUserId, ConfirmTime = confirm.ConfirmTime, - RealName = user.LastName + " / " + user.FirstName, + RealName = user.FullName, UserName = user.UserName, - UserTypeId = user.UserTypeId, - UserTypeShortName = user.UserTypeRole.UserTypeShortName + + DocTypeCode=sysDoc.FileType.Code + + //UserTypeId = user.UserTypeId, + //UserTypeShortName = user.UserTypeRole.UserTypeShortName }; - return await query.WhereIf(inQuery.IsSigned == true, t => t.ConfirmTime != null) + var list = await query + //过滤掉删除的,并且没有签名的 + .Where(t => !(t.IsDeleted == true && t.ConfirmTime == null)) + .WhereIf(inQuery.IsSigned == true, t => t.ConfirmTime != null) .WhereIf(inQuery.IsSigned == false, t => t.ConfirmTime == null) - .ToPagedListAsync(inQuery); + .ToPagedListAsync(inQuery,nameof(UnionDocumentWithConfirmInfoView.DocTypeCode)); + + + return list; diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index a95ee52e8..c11c09348 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -6,8 +6,13 @@ using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Filter; +using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using NPOI.SS.Formula.Functions; +using System.Linq; +using System.Linq.Dynamic.Core; namespace IRaCIS.Core.Application.Services { @@ -16,15 +21,15 @@ namespace IRaCIS.Core.Application.Services /// [ApiExplorerSettings(GroupName = "Trial")] public class TrialDocumentService(IRepository _trialDocumentRepository, - IRepository _trialDocUserTypeConfirmedUserRepository, IRepository _trialRepository, ISystemDocumentService _systemDocumentService, - IRepository _systemDocConfirmedUserRepository, + IRepository _systemDocConfirmedUserRepository, IRepository _systemDocNeedConfirmedUserTypeRepository, IRepository _trialDocNeedConfirmedUserTypeRepository, IRepository _systemDocumentRepository, - IRepository _trialUserRepository, - IRepository _trialDocConfirmedUserRepository, + IRepository _trialIdentityUserRepository, + IRepository _trialUserRoleRepository, + IRepository _trialDocConfirmedUserRepository, IRepository _readingQuestionCriterionTrialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialDocumentService { @@ -57,9 +62,9 @@ namespace IRaCIS.Core.Application.Services .WhereIf(inQuery.TrialId != null, t => t.TrialId == inQuery.TrialId) .Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) - join trialUser in _trialUserRepository.Where(t => t.UserId == _userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId + join trialUser in _trialIdentityUserRepository.Where(t => t.IdentityUserId == _userInfo.IdentityUserId) on trialDoc.TrialId equals trialUser.TrialId join confirm in _trialDocConfirmedUserRepository.Where() on - new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc + new { trialUser.IdentityUserId, TrialDocumentId = trialDoc.Id } equals new { IdentityUserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc from confirm in cc.DefaultIfEmpty() select new TrialSignDocView() @@ -82,11 +87,12 @@ namespace IRaCIS.Core.Application.Services //IsConfirmed = confirm.ConfirmTime != null, ConfirmUserId = confirm.ConfirmUserId, ConfirmTime = confirm.ConfirmTime, - RealName = trialUser.User.FullName, - UserName = trialUser.User.UserName, - UserTypeId = trialUser.User.UserTypeId, - UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName + RealName = trialUser.IdentityUser.FullName, + UserName = trialUser.IdentityUser.UserName, + IdentityUserTypeList = trialUser.TrialUserRoleList.Select(t => t.UserRole.UserTypeRole.UserTypeShortName).ToList(), + + DocNeedSignUserTypeList = trialDoc.NeedConfirmedUserTypeList.Select(t => t.UserTypeRole.UserTypeShortName).ToList(), }; trialDocQueryable = trialDocQueryable.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) @@ -218,75 +224,180 @@ namespace IRaCIS.Core.Application.Services var trialInfo = await (_trialRepository.Where(t => t.Id == inQuery.TrialId, ignoreQueryFilters: true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync()); - //系统文档查询 - var systemDocumentQueryable = from needConfirmedUserType in _systemDocNeedConfirmedUserTypeRepository.Where(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId, ignoreQueryFilters: true) - .WhereIf(trialInfo.TrialFinishedTime != null, u => u.SystemDocument.CreateTime < trialInfo.TrialFinishedTime) - .WhereIf(!_userInfo.IsAdmin, t => t.SystemDocument.IsDeleted == false || (t.SystemDocument.IsDeleted == true && t.SystemDocument.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id))) - join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId && t.UserId == _userInfo.Id) - on needConfirmedUserType.NeedConfirmUserTypeId equals trialUser.User.UserTypeId - join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.UserId, SystemDocumentId = needConfirmedUserType.SystemDocumentId } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc - from confirm in cc.DefaultIfEmpty() - select new UnionDocumentWithConfirmInfoView() - { - IsSystemDoc = true, + #region 统一用户修改 - Id = needConfirmedUserType.SystemDocument.Id, - CreateTime = needConfirmedUserType.SystemDocument.CreateTime, - IsDeleted = needConfirmedUserType.SystemDocument.IsDeleted, - SignViewMinimumMinutes = needConfirmedUserType.SystemDocument.SignViewMinimumMinutes, - Name = needConfirmedUserType.SystemDocument.Name, - Path = needConfirmedUserType.SystemDocument.Path, - FileTypeId = needConfirmedUserType.SystemDocument.FileTypeId, - FileType = _userInfo.IsEn_Us ? needConfirmedUserType.SystemDocument.FileType.Value : needConfirmedUserType.SystemDocument.FileType.ValueCN, - UpdateTime = needConfirmedUserType.SystemDocument.UpdateTime, + var systemDocQuery = + from sysDoc in _systemDocumentRepository.AsQueryable(true).Where(t => t.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + from trialUser in _trialIdentityUserRepository.AsQueryable(false) + .Where(t => t.TrialId == inQuery.TrialId && t.IdentityUserId == _userInfo.IdentityUserId + && t.TrialUserRoleList.Any(t => sysDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId))) - FullFilePath = needConfirmedUserType.SystemDocument.Path, + join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.IdentityUserId, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc + from confirm in cc.DefaultIfEmpty() + select new UnionDocumentWithConfirmInfoView() + { + IsSystemDoc = true, + + Id = sysDoc.Id, + CreateTime = sysDoc.CreateTime, + IsDeleted = sysDoc.IsDeleted, + SignViewMinimumMinutes = sysDoc.SignViewMinimumMinutes, + Name = sysDoc.Name, + Path = sysDoc.Path, + FileType = _userInfo.IsEn_Us ? sysDoc.FileType.Value : sysDoc.FileType.ValueCN, + FileTypeId = sysDoc.FileTypeId, + UpdateTime = sysDoc.UpdateTime, + //IsConfirmed = confirm.ConfirmTime != null, + + ConfirmUserId = confirm.ConfirmUserId, + ConfirmTime = confirm.ConfirmTime, + + RealName = trialUser.IdentityUser.FullName, + UserName = trialUser.IdentityUser.UserName, + + //UserTypeId = trialUser.UserRole.UserTypeId, + //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, + //DocNeedSignUserTypeList = sysDoc.NeedConfirmedUserTypeList.Select(t => t.UserTypeRole.UserTypeName), + + FullFilePath = sysDoc.Path + }; - //IsConfirmed = confirm.ConfirmTime != null, - ConfirmUserId = confirm.ConfirmUserId, - ConfirmTime = confirm.ConfirmTime, - RealName = trialUser.User.FullName, - UserName = trialUser.User.UserName, - UserTypeId = trialUser.User.UserTypeId, - UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName - }; //项目文档查询 - var trialDocQueryable = from trialDoc in _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == inQuery.TrialId) - .WhereIf(!_userInfo.IsAdmin, t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) - .WhereIf(!_userInfo.IsAdmin, t => t.IsDeleted == false || (t.IsDeleted == true && t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id))) + var trialDocQuery = + from trialDoc in _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == inQuery.TrialId).Where(t => t.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId && t.IdentityUserId == _userInfo.IdentityUserId + && t.TrialUserRoleList.Any(t => trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId))) - join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId && t.UserId == _userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId - join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on - new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc - from confirm in cc.DefaultIfEmpty() - select new UnionDocumentWithConfirmInfoView() - { - Id = trialDoc.Id, - IsSystemDoc = false, - CreateTime = trialDoc.CreateTime, - FullFilePath = trialDoc.Path, - IsDeleted = trialDoc.IsDeleted, - Name = trialDoc.Name, - Path = trialDoc.Path, - FileTypeId = trialDoc.FileTypeId, - FileType = _userInfo.IsEn_Us ? trialDoc.FileType.Value : trialDoc.FileType.ValueCN, - UpdateTime = trialDoc.UpdateTime, - SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes, + join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on + new { trialUser.IdentityUserId, TrialDocumentId = trialDoc.Id } equals new { IdentityUserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc + from confirm in cc.DefaultIfEmpty() + select new UnionDocumentWithConfirmInfoView() + { + IsSystemDoc = false, - //IsConfirmed = confirm.ConfirmTime != null, - ConfirmUserId = confirm.ConfirmUserId, - ConfirmTime = confirm.ConfirmTime, - RealName = trialUser.User.FullName, - UserName = trialUser.User.UserName, - UserTypeId = trialUser.User.UserTypeId, - UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName + Id = trialDoc.Id, + CreateTime = trialDoc.CreateTime, + IsDeleted = trialDoc.IsDeleted, + SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes, + Name = trialDoc.Name, + Path = trialDoc.Path, + FileTypeId = trialDoc.FileTypeId, + FileType = _userInfo.IsEn_Us ? trialDoc.FileType.Value : trialDoc.FileType.ValueCN, + UpdateTime = trialDoc.UpdateTime, + //IsConfirmed= confirm.ConfirmTime!=null, - }; + + + ConfirmUserId = confirm.ConfirmUserId, + ConfirmTime = confirm.ConfirmTime, + RealName = trialUser.IdentityUser.FullName, + UserName = trialUser.IdentityUser.UserName, + + //DocNeedSignUserTypeList = trialDoc.NeedConfirmedUserTypeList.Select(t => t.UserTypeRole.UserTypeName), + + //UserTypeId = trialUser.UserRole.UserTypeId, + //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, + + FullFilePath = trialDoc.Path + }; + + + + #endregion + + + + #region 废弃 + + ////系统文档查询 + //var systemDocQuery = from needConfirmedUserType in _systemDocNeedConfirmedUserTypeRepository.Where(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId, ignoreQueryFilters: true) + // .WhereIf(trialInfo.TrialFinishedTime != null, u => u.SystemDocument.CreateTime < trialInfo.TrialFinishedTime) + // .WhereIf(!_userInfo.IsAdmin, t => t.SystemDocument.IsDeleted == false || (t.SystemDocument.IsDeleted == true && t.SystemDocument.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId))) + + // join trialUser in _trialUserRoleRepository.Where(t => t.TrialId == inQuery.TrialId && t.UserRole.IdentityUserId == _userInfo.IdentityUserId) + // on needConfirmedUserType.NeedConfirmUserTypeId equals trialUser.UserRole.UserTypeId + // join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.UserId, SystemDocumentId = needConfirmedUserType.SystemDocumentId } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc + // from confirm in cc.DefaultIfEmpty() + // select new UnionDocumentWithConfirmInfoView() + // { + // IsSystemDoc = true, + + // Id = needConfirmedUserType.SystemDocument.Id, + // CreateTime = needConfirmedUserType.SystemDocument.CreateTime, + // IsDeleted = needConfirmedUserType.SystemDocument.IsDeleted, + // SignViewMinimumMinutes = needConfirmedUserType.SystemDocument.SignViewMinimumMinutes, + // Name = needConfirmedUserType.SystemDocument.Name, + // Path = needConfirmedUserType.SystemDocument.Path, + // FileTypeId = needConfirmedUserType.SystemDocument.FileTypeId, + // FileType = _userInfo.IsEn_Us ? needConfirmedUserType.SystemDocument.FileType.Value : needConfirmedUserType.SystemDocument.FileType.ValueCN, + // UpdateTime = needConfirmedUserType.SystemDocument.UpdateTime, + + // FullFilePath = needConfirmedUserType.SystemDocument.Path, + + // //IsConfirmed = confirm.ConfirmTime != null, + // ConfirmUserId = confirm.ConfirmUserId, + // ConfirmTime = confirm.ConfirmTime, + // RealName = trialUser.UserRole.FullName, + // UserName = trialUser.UserRole.IdentityUser.UserName, + + + + // //IdentityUserTypeList = trialUser.TrialUser.TrialUserRoleList.Select(t => t.UserRole.UserTypeRole.UserTypeShortName), + + // //DocNeedSignUserTypeList = needConfirmedUserType.SystemDocument.NeedConfirmedUserTypeList.Select(t => t.UserTypeRole.UserTypeShortName).ToList(), + + // //UserTypeId = trialUser.UserRole.UserTypeId, + // //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName + // }; + + ////项目文档查询 + //var trialDocQuery = from trialDoc in _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == inQuery.TrialId) + // .WhereIf(!_userInfo.IsAdmin, t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + // .WhereIf(!_userInfo.IsAdmin, t => t.IsDeleted == false || (t.IsDeleted == true && t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId))) + + // join trialUser in _trialUserRoleRepository.Where(t => t.TrialId == inQuery.TrialId && t.UserRole.IdentityUserId == _userInfo.IdentityUserId) on trialDoc.TrialId equals trialUser.TrialId + // join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on + // new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc + // from confirm in cc.DefaultIfEmpty() + // select new UnionDocumentWithConfirmInfoView() + // { + // Id = trialDoc.Id, + // IsSystemDoc = false, + // CreateTime = trialDoc.CreateTime, + // FullFilePath = trialDoc.Path, + // IsDeleted = trialDoc.IsDeleted, + // Name = trialDoc.Name, + // Path = trialDoc.Path, + // FileTypeId = trialDoc.FileTypeId, + // FileType = _userInfo.IsEn_Us ? trialDoc.FileType.Value : trialDoc.FileType.ValueCN, + // UpdateTime = trialDoc.UpdateTime, + // SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes, + + // //IsConfirmed = confirm.ConfirmTime != null, + // ConfirmUserId = confirm.ConfirmUserId, + // ConfirmTime = confirm.ConfirmTime, + // RealName = trialUser.UserRole.FullName, + // UserName = trialUser.UserRole.IdentityUser.UserName, + + // //UserTypeId = trialUser.UserRole.UserTypeId, + // //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName + + + // //IdentityUserTypeList = trialUser.TrialUser.TrialUserRoleList.Select(t => t.UserRole.UserTypeRole.UserTypeShortName).ToList(), + + // //DocNeedSignUserTypeList = trialDoc.NeedConfirmedUserTypeList.Select(t => t.UserTypeRole.UserTypeShortName).ToList(), + // }; + + #endregion #region 报错 奇怪的bug - var unionQuery = systemDocumentQueryable.Union(trialDocQueryable) + + + var unionQuery = systemDocQuery.Concat(trialDocQuery) + //过滤掉删除的,并且没有签名的 + .Where(t=>!(t.IsDeleted == true && t.ConfirmTime==null)) .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) .WhereIf(inQuery.IsSign == true, t => t.ConfirmTime != null) @@ -318,16 +429,14 @@ namespace IRaCIS.Core.Application.Services #endregion - - var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == inQuery.TrialId && t.Trial.TrialStatusStr != StaticData.TrialState.TrialStopped) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) .CountAsync(); - var needSignSystemDocCount = await _systemDocumentRepository - .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + var needSignSystemDocCount = await _systemDocumentRepository.AsQueryable(true) + .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) .CountAsync(); var trialTaskConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefault(); @@ -338,7 +447,7 @@ namespace IRaCIS.Core.Application.Services var isAdditionalAssessment = _readingQuestionCriterionTrialRepository.Where(t => t.TrialId == trialId && t.IsSigned && t.IsAdditionalAssessment == true && t.TrialCriterionAdditionalAssessmentTypeList.Any(c =>/*c.AdditionalAssessmentType==Domain.Share.Reading.AdditionalAssessmentType.BrainMetastasis &&*/ c.IsSelected == true)).Any(); - return ResponseOutput.Ok>(result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, IsAdditionalAssessment = isAdditionalAssessment && isManualGenerateTask, TrialStatusStr = trialInfo.TrialStatusStr, TrialConfig = trialTaskConfig }); + return ResponseOutput.Ok(result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, IsAdditionalAssessment = isAdditionalAssessment && isManualGenerateTask, TrialStatusStr = trialInfo.TrialStatusStr, TrialConfig = trialTaskConfig }); } @@ -353,10 +462,151 @@ namespace IRaCIS.Core.Application.Services public async Task>> GetDocumentConfirmList(DocumentTrialUnionQuery inQuery) { + #region 测试 + + var trialInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId, ignoreQueryFilters: true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync()); + + var trialDocQuery = + from trialDoc in _trialDocumentRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId) + .Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true) + from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId + && t.TrialUserRoleList.AsQueryable().Any(t => trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId)) + ) + .Where(t => inQuery.UserId != null ? t.IdentityUserId == inQuery.UserId : true) + + join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on + new { trialUser.IdentityUserId, TrialDocumentId = trialDoc.Id } equals new { IdentityUserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc + from confirm in cc.DefaultIfEmpty() + select new UnionDocumentWithConfirmInfoView() + { + IsSystemDoc = false, + + Id = trialDoc.Id, + CreateTime = trialDoc.CreateTime, + IsDeleted = trialDoc.IsDeleted, + SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes, + Name = trialDoc.Name, + Path = trialDoc.Path, + FileTypeId = trialDoc.FileTypeId, + FileType = _userInfo.IsEn_Us ? trialDoc.FileType.Value : trialDoc.FileType.ValueCN, + UpdateTime = trialDoc.UpdateTime, + //IsConfirmed= confirm.ConfirmTime!=null, + + + + ConfirmUserId = trialUser.IdentityUserId, + ConfirmTime = confirm.ConfirmTime, + RealName = trialUser.IdentityUser.FullName, + UserName = trialUser.IdentityUser.UserName, + + //UserTypeId = trialUser.UserRole.UserTypeId, + //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, + //DocNeedSignUserTypeList = trialDoc.NeedConfirmedUserTypeList.Select(t => t.UserTypeRole.UserTypeName), + + FullFilePath = trialDoc.Path + }; + + + + var systemDocQuery = + from sysDoc in _systemDocumentRepository.AsQueryable(false).Where(u => trialInfo.TrialFinishedTime != null ? u.CreateTime < trialInfo.TrialFinishedTime : true) + from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId + && t.TrialUserRoleList.Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId))) + .Where(t => inQuery.UserId != null ? t.IdentityUserId == inQuery.UserId : true) + + join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.IdentityUserId, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc + from confirm in cc.DefaultIfEmpty() + select new UnionDocumentWithConfirmInfoView() + { + IsSystemDoc = true, + + Id = sysDoc.Id, + CreateTime = sysDoc.CreateTime, + IsDeleted = sysDoc.IsDeleted, + SignViewMinimumMinutes = sysDoc.SignViewMinimumMinutes, + Name = sysDoc.Name, + Path = sysDoc.Path, + FileType = _userInfo.IsEn_Us ? sysDoc.FileType.Value : sysDoc.FileType.ValueCN, + FileTypeId = sysDoc.FileTypeId, + UpdateTime = sysDoc.UpdateTime, + //IsConfirmed = confirm.ConfirmTime != null, + + ConfirmUserId = trialUser.IdentityUserId, + ConfirmTime = confirm.ConfirmTime, + + RealName = trialUser.IdentityUser.FullName, + UserName = trialUser.IdentityUser.UserName, + + //UserTypeId = trialUser.UserRole.UserTypeId, + //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, + + FullFilePath = sysDoc.Path + }; + + //var tt = await trialDocQuery.ToPagedListAsync(inQuery); + + var unionQuery = trialDocQuery.Union(systemDocQuery).IgnoreQueryFilters().Where(t => !(t.IsDeleted == true && t.ConfirmTime == null)) + .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) + .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) + .WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null) + .WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null) + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted); + + var result = await unionQuery.ToPagedListAsync(inQuery); + + #region 处理文档 需要签署的角色类型 和每个人的角色信息 + + var trialDocIdList = result.CurrentPageData.Where(t => t.IsSystemDoc == false).Select(t => t.Id).ToList(); + + var sysDocIdList = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList(); + + var trialIdentityUserIdList = result.CurrentPageData.Select(t => t.ConfirmUserId).Distinct().ToList(); + + var trialDocUserTypeList = _trialDocNeedConfirmedUserTypeRepository.Where(t => trialDocIdList.Contains(t.TrialDocumentId)).Select(t => new { t.TrialDocumentId, t.UserTypeRole.UserTypeShortName }).ToList(); + + var sysDocUserTypeList = _systemDocNeedConfirmedUserTypeRepository.Where(t => sysDocIdList.Contains(t.SystemDocumentId)).Select(t => new { t.SystemDocumentId, t.UserTypeRole.UserTypeShortName }).ToList(); + + var trialUserUserTypeList = _trialIdentityUserRepository.Where(t => t.TrialId==inQuery.TrialId && trialIdentityUserIdList.Contains(t.IdentityUserId)).IgnoreQueryFilters().Select(t => new { t.IdentityUserId, UserTypeList = t.TrialUserRoleList.Select(c => c.UserRole.UserTypeRole.UserTypeShortName).ToList() }); + + + foreach (var item in result.CurrentPageData) + { + if (item.IsSystemDoc) + { + item.DocNeedSignUserTypeList = sysDocUserTypeList.Where(t => t.SystemDocumentId == item.Id).Select(t => t.UserTypeShortName).ToList(); + } + else + { + item.DocNeedSignUserTypeList = trialDocUserTypeList.Where(t => t.TrialDocumentId == item.Id).Select(t => t.UserTypeShortName).ToList(); + } + + item.IdentityUserTypeList = trialUserUserTypeList.Where(t => t.IdentityUserId == item.ConfirmUserId).SelectMany(c => c.UserTypeList).ToList(); + } + + + #endregion + + var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + .CountAsync(); + + + var needSignSystemDocCount = await _systemDocumentRepository + .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + .CountAsync(); + + + return ResponseOutput.Ok(result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, TrialStatusStr = trialInfo.TrialStatusStr }); + + + + + #endregion #region linq join 方式 //var trialDocQuery = from trialDocumentNeedConfirmedUserType in _trialDocumentNeedConfirmedUserTypeRepository.Where(t => t.TrialDocument.TrialId == querySystemDocument.TrialId) - // join trialUser in _trialUserRepository.Where(t => t.TrialId == querySystemDocument.TrialId) + // join trialUser in _trialUserRoleRepository.Where(t => t.TrialId == querySystemDocument.TrialId) // .WhereIf(querySystemDocument.UserId != null, t => t.UserId == querySystemDocument.UserId) // on trialDocumentNeedConfirmedUserType.NeedConfirmUserTypeId equals trialUser.User.UserTypeId @@ -387,100 +637,106 @@ namespace IRaCIS.Core.Application.Services #endregion - var trialInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId, ignoreQueryFilters: true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync()); + #region 废弃 + //var trialInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId, ignoreQueryFilters: true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync()); - var trialDocQuery = from trialDocumentNeedConfirmedUserType in _trialDocNeedConfirmedUserTypeRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) - join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId) - .WhereIf(inQuery.UserId != null, t => t.UserId == inQuery.UserId) - .WhereIf(inQuery.UserTypeId != null, t => t.User.UserTypeId == inQuery.UserTypeId) - on trialDocumentNeedConfirmedUserType.NeedConfirmUserTypeId equals trialUser.User.UserTypeId + //var trialDocQuery = from trialDocumentNeedConfirmedUserType in _trialDocNeedConfirmedUserTypeRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) + // join trialUser in _trialUserRoleRepository.Where(t => t.TrialId == inQuery.TrialId) + // .WhereIf(inQuery.UserId != null, t => t.UserRole.IdentityUserId == inQuery.UserId) + // .WhereIf(inQuery.UserTypeId != null, t => t.UserRole.UserTypeId == inQuery.UserTypeId) + // on trialDocumentNeedConfirmedUserType.NeedConfirmUserTypeId equals trialUser.UserRole.UserTypeId - join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on - new { trialUser.UserId, TrialDocumentId = trialDocumentNeedConfirmedUserType.TrialDocumentId } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc - from confirm in cc.DefaultIfEmpty() - select new UnionDocumentWithConfirmInfoView() - { - IsSystemDoc = false, + // join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on + // new { trialUser.UserRole.IdentityUserId, TrialDocumentId = trialDocumentNeedConfirmedUserType.TrialDocumentId } equals new { IdentityUserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc + // from confirm in cc.DefaultIfEmpty() + // select new UnionDocumentWithConfirmInfoView() + // { + // IsSystemDoc = false, - Id = trialDocumentNeedConfirmedUserType.TrialDocument.Id, - CreateTime = trialDocumentNeedConfirmedUserType.TrialDocument.CreateTime, - IsDeleted = trialDocumentNeedConfirmedUserType.TrialDocument.IsDeleted, - SignViewMinimumMinutes = trialDocumentNeedConfirmedUserType.TrialDocument.SignViewMinimumMinutes, - Name = trialDocumentNeedConfirmedUserType.TrialDocument.Name, - Path = trialDocumentNeedConfirmedUserType.TrialDocument.Path, - FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId, - FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN, - UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime, - //IsConfirmed= confirm.ConfirmTime!=null, + // Id = trialDocumentNeedConfirmedUserType.TrialDocument.Id, + // CreateTime = trialDocumentNeedConfirmedUserType.TrialDocument.CreateTime, + // IsDeleted = trialDocumentNeedConfirmedUserType.TrialDocument.IsDeleted, + // SignViewMinimumMinutes = trialDocumentNeedConfirmedUserType.TrialDocument.SignViewMinimumMinutes, + // Name = trialDocumentNeedConfirmedUserType.TrialDocument.Name, + // Path = trialDocumentNeedConfirmedUserType.TrialDocument.Path, + // FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId, + // FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN, + // UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime, + // //IsConfirmed= confirm.ConfirmTime!=null, - ConfirmUserId = confirm.ConfirmUserId, - ConfirmTime = confirm.ConfirmTime, - RealName = trialUser.User.FullName, - UserName = trialUser.User.UserName, - UserTypeId = trialUser.User.UserTypeId, - UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName, + // ConfirmUserId = confirm.ConfirmUserId, + // ConfirmTime = confirm.ConfirmTime, + // RealName = trialUser.UserRole.FullName, + // UserName = trialUser.UserRole.IdentityUser.UserName, - FullFilePath = trialDocumentNeedConfirmedUserType.TrialDocument.Path - }; + // //UserTypeId = trialUser.UserRole.UserTypeId, + // //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, + + // FullFilePath = trialDocumentNeedConfirmedUserType.TrialDocument.Path + // }; - var systemDocQuery = from needConfirmEdUserType in _systemDocNeedConfirmedUserTypeRepository.WhereIf(trialInfo.TrialFinishedTime != null, u => u.SystemDocument.CreateTime < trialInfo.TrialFinishedTime) + //var systemDocQuery = from needConfirmEdUserType in _systemDocNeedConfirmedUserTypeRepository.WhereIf(trialInfo.TrialFinishedTime != null, u => u.SystemDocument.CreateTime < trialInfo.TrialFinishedTime) - join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId) - .WhereIf(inQuery.UserId != null, t => t.UserId == inQuery.UserId) - on needConfirmEdUserType.NeedConfirmUserTypeId equals trialUser.User.UserTypeId - join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.UserId, SystemDocumentId = needConfirmEdUserType.SystemDocumentId } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc - from confirm in cc.DefaultIfEmpty() - select new UnionDocumentWithConfirmInfoView() - { - IsSystemDoc = true, + // join trialUser in _trialUserRoleRepository.Where(t => t.TrialId == inQuery.TrialId) + // .WhereIf(inQuery.UserId != null, t => t.UserRole.IdentityUserId == inQuery.UserId) + // on needConfirmEdUserType.NeedConfirmUserTypeId equals trialUser.UserRole.UserTypeId + // join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.UserId, SystemDocumentId = needConfirmEdUserType.SystemDocumentId } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc + // from confirm in cc.DefaultIfEmpty() + // select new UnionDocumentWithConfirmInfoView() + // { + // IsSystemDoc = true, - Id = needConfirmEdUserType.SystemDocument.Id, - CreateTime = needConfirmEdUserType.SystemDocument.CreateTime, - IsDeleted = needConfirmEdUserType.SystemDocument.IsDeleted, - SignViewMinimumMinutes = needConfirmEdUserType.SystemDocument.SignViewMinimumMinutes, - Name = needConfirmEdUserType.SystemDocument.Name, - Path = needConfirmEdUserType.SystemDocument.Path, - FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN, - FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId, - UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime, - //IsConfirmed = confirm.ConfirmTime != null, + // Id = needConfirmEdUserType.SystemDocument.Id, + // CreateTime = needConfirmEdUserType.SystemDocument.CreateTime, + // IsDeleted = needConfirmEdUserType.SystemDocument.IsDeleted, + // SignViewMinimumMinutes = needConfirmEdUserType.SystemDocument.SignViewMinimumMinutes, + // Name = needConfirmEdUserType.SystemDocument.Name, + // Path = needConfirmEdUserType.SystemDocument.Path, + // FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN, + // FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId, + // UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime, + // //IsConfirmed = confirm.ConfirmTime != null, - ConfirmUserId = confirm.ConfirmUserId, - ConfirmTime = confirm.ConfirmTime, - RealName = trialUser.User.FullName, - UserName = trialUser.User.UserName, - UserTypeId = trialUser.User.UserTypeId, - UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName, + // ConfirmUserId = confirm.ConfirmUserId, + // ConfirmTime = confirm.ConfirmTime, + // RealName = trialUser.UserRole.FullName, + // UserName = trialUser.UserRole.IdentityUser.UserName, - FullFilePath = needConfirmEdUserType.SystemDocument.Path - }; + // //UserTypeId = trialUser.UserRole.UserTypeId, + // //UserTypeShortName = trialUser.UserRole.UserTypeRole.UserTypeShortName, - var unionQuery = trialDocQuery.Union(systemDocQuery).IgnoreQueryFilters().Where(t => !(t.IsDeleted == true && t.ConfirmUserId == null)) - .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) - .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) - .WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null) - .WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null) - .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) - .WhereIf(inQuery.UserTypeId != null, t => t.UserTypeId == inQuery.UserTypeId); + // FullFilePath = needConfirmEdUserType.SystemDocument.Path + // }; - var result = await unionQuery.ToPagedListAsync(inQuery); + //var unionQuery = trialDocQuery.Union(systemDocQuery).IgnoreQueryFilters().Where(t => !(t.IsDeleted == true && t.ConfirmUserId == null)) + // .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) + // .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) + // .WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null) + // .WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null) + // .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + // /*.Distinct()*/; - var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) - .CountAsync(); + //var result = await unionQuery.ToPagedListAsync(inQuery); + + //var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true) + // .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId)) + // .Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + // .CountAsync(); - var needSignSystemDocCount = await _systemDocumentRepository - .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) - .CountAsync(); + //var needSignSystemDocCount = await _systemDocumentRepository + // .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + // .CountAsync(); - return ResponseOutput.Ok(result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, TrialStatusStr = trialInfo.TrialStatusStr }); + //return ResponseOutput.Ok(result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, TrialStatusStr = trialInfo.TrialStatusStr }); + + #endregion + } @@ -492,8 +748,8 @@ namespace IRaCIS.Core.Application.Services [HttpGet("{trialId:guid}")] public async Task> GetTrialUserSelect(Guid trialId) { - return await _trialUserRepository.Where(t => t.TrialId == trialId) - .Select(t => new TrialUserDto() { UserId = t.UserId, RealName = t.User.FullName, UserName = t.User.UserName }) + return await _trialIdentityUserRepository.Where(t => t.TrialId == trialId) + .Select(t => new TrialUserDto() { UserId = t.IdentityUserId, RealName = t.IdentityUser.FullName, UserName = t.IdentityUser.UserName }) .ToListAsync(); } @@ -513,7 +769,7 @@ namespace IRaCIS.Core.Application.Services return ResponseOutput.Ok(result); } - [TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )] + [TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")] //[Authorize(Policy = IRaCISPolicy.PM)] public async Task AddOrUpdateTrialDocument(AddOrEditTrialDocument addOrEditTrialDocument) { @@ -585,7 +841,7 @@ namespace IRaCIS.Core.Application.Services /// [HttpDelete("{trialId:guid}/{trialDocumentId:guid}")] //[Authorize(Policy = IRaCISPolicy.PM)] - [TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )] + [TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")] public async Task DeleteTrialDocument(Guid trialDocumentId, Guid trialId) { if (await _trialDocumentRepository.AsQueryable(true).Where(t => t.Id == trialDocumentId).AnyAsync(t => t.TrialDocConfirmedUserList.Any())) @@ -614,9 +870,9 @@ namespace IRaCIS.Core.Application.Services var success = false; if (isSystemDoc) { - if (!await _systemDocConfirmedUserRepository.AnyAsync(t => t.SystemDocumentId == documentId && t.ConfirmUserId == _userInfo.Id)) + if (!await _systemDocConfirmedUserRepository.AnyAsync(t => t.SystemDocumentId == documentId && t.ConfirmUserId == _userInfo.IdentityUserId)) { - await _systemDocConfirmedUserRepository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now }); + await _systemDocConfirmedUserRepository.AddAsync(new SystemDocConfirmedIdentityUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.IdentityUserId, SignFirstViewTime = DateTime.Now }); } @@ -624,10 +880,10 @@ namespace IRaCIS.Core.Application.Services else { - if (!await _trialDocUserTypeConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.Id)) + if (!await _trialDocConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.IdentityUserId)) { - await _trialDocConfirmedUserRepository.AddAsync(new TrialDocConfirmedUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now }); + await _trialDocConfirmedUserRepository.AddAsync(new TrialDocConfirmedIdentityUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.IdentityUserId, SignFirstViewTime = DateTime.Now }); } @@ -642,9 +898,9 @@ namespace IRaCIS.Core.Application.Services [HttpPut("{documentId:guid}")] public async Task SetSystemDocFirstViewTime(Guid documentId) { - if (!await _systemDocConfirmedUserRepository.AnyAsync(t => t.SystemDocumentId == documentId && t.ConfirmUserId == _userInfo.Id)) + if (!await _systemDocConfirmedUserRepository.AnyAsync(t => t.SystemDocumentId == documentId && t.ConfirmUserId == _userInfo.IdentityUserId)) { - await _systemDocConfirmedUserRepository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now }); + await _systemDocConfirmedUserRepository.AddAsync(new SystemDocConfirmedIdentityUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.IdentityUserId, SignFirstViewTime = DateTime.Now }); } @@ -656,10 +912,10 @@ namespace IRaCIS.Core.Application.Services [HttpPut("{trialId:guid}/{documentId:guid}")] public async Task SetTrialDocFirstViewTime(Guid documentId) { - if (!await _trialDocUserTypeConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.Id)) + if (!await _trialDocConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.IdentityUserId)) { - await _trialDocConfirmedUserRepository.AddAsync(new TrialDocConfirmedUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now }); + await _trialDocConfirmedUserRepository.AddAsync(new TrialDocConfirmedIdentityUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.IdentityUserId, SignFirstViewTime = DateTime.Now }); } var success = await _trialDocConfirmedUserRepository.SaveChangesAsync(); @@ -671,14 +927,14 @@ namespace IRaCIS.Core.Application.Services /// 用户 签名某个文档 可能是系统的,也可能是项目的 /// /// - [TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )] + [TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")] public async Task UserConfirm(UserConfirmCommand userConfirmCommand) { if (userConfirmCommand.isSystemDoc) { - var sysDocConfirm = await _systemDocConfirmedUserRepository.FirstOrDefaultAsync(t => t.SystemDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.Id, true); + var sysDocConfirm = await _systemDocConfirmedUserRepository.FirstOrDefaultAsync(t => t.SystemDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.IdentityUserId, true); if (sysDocConfirm.ConfirmTime != null) { @@ -705,7 +961,7 @@ namespace IRaCIS.Core.Application.Services else { - var trialDocConfirm = await _trialDocUserTypeConfirmedUserRepository.FirstOrDefaultAsync(t => t.TrialDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.Id, true); + var trialDocConfirm = await _trialDocConfirmedUserRepository.FirstOrDefaultAsync(t => t.TrialDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.IdentityUserId, true); if (trialDocConfirm.ConfirmTime != null) { @@ -722,7 +978,7 @@ namespace IRaCIS.Core.Application.Services trialDocConfirm.ConfirmTime = DateTime.Now; trialDocConfirm.SignText = userConfirmCommand.SignText; - await _trialDocUserTypeConfirmedUserRepository.SaveChangesAsync(); + await _trialDocConfirmedUserRepository.SaveChangesAsync(); } @@ -738,13 +994,13 @@ namespace IRaCIS.Core.Application.Services /// /// [HttpPut("{documentId:guid}/{isSystemDoc:bool}")] - [TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt", "SignSystemDocNoTrialId" )] + [TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt", "SignSystemDocNoTrialId")] public async Task UserAbandonDoc(Guid documentId, bool isSystemDoc) { if (isSystemDoc) { await _systemDocumentRepository.UpdatePartialFromQueryAsync(documentId, u => new SystemDocument() { IsDeleted = true }); - await _systemDocConfirmedUserRepository.UpdatePartialFromQueryAsync(x => x.SystemDocumentId == documentId, x => new SystemDocConfirmedUser() + await _systemDocConfirmedUserRepository.UpdatePartialFromQueryAsync(x => x.SystemDocumentId == documentId, x => new SystemDocConfirmedIdentityUser() { IsDeleted = true }); @@ -752,7 +1008,7 @@ namespace IRaCIS.Core.Application.Services else { await _trialDocumentRepository.UpdatePartialFromQueryAsync(documentId, u => new TrialDocument() { IsDeleted = true }); - await _trialDocUserTypeConfirmedUserRepository.UpdatePartialFromQueryAsync(x => x.TrialDocumentId == documentId, x => new TrialDocConfirmedUser() + await _trialDocConfirmedUserRepository.UpdatePartialFromQueryAsync(x => x.TrialDocumentId == documentId, x => new TrialDocConfirmedIdentityUser() { IsDeleted = true }); @@ -762,93 +1018,8 @@ namespace IRaCIS.Core.Application.Services } - #region 废弃 - /// - /// 从项目下参与者的维度 先看人员列表(展示统计数字) 点击数字 再看人员具体签署的 系统文档+项目文档(共用上面与人相关的具体文档列表) - /// - /// - /// - [HttpGet("{trialId:guid}")] - [Obsolete] - public List GetTrialUserDocumentList(Guid trialId) - { - var query = _trialUserRepository.Where(t => t.TrialId == trialId) - .Select(t => new TrialUserUnionDocumentView() - { - UserId = t.UserId, - UserName = t.User.UserName, - RealName = t.User.FullName, - UserTypeShortName = t.User.UserTypeRole.UserTypeShortName, - TrialDocumentCount = t.Trial.TrialDocumentList.Count(u => u.NeedConfirmedUserTypeList.Any(k => k.NeedConfirmUserTypeId == t.User.UserTypeId)), - TrialDocumentConfirmedCount = t.Trial.TrialDocumentList.SelectMany(u => u.TrialDocConfirmedUserList).Count(k => k.ConfirmUserId == t.UserId), - SystemDocumentConfirmedCount = t.User.SystemDocConfirmedList.Count(), - //这样写不行 - //SystemDocumentCount = _systemDocumentRepository.Where(s => s.NeedConfirmedUserTypeList.Any(kk => kk.NeedConfirmUserTypeId == t.User.UserTypeId)) - // .WhereIf(!_userInfo.IsAdmin, s => s.IsAbandon == false || (s.IsAbandon == true && s.SystemDocConfirmedUserList.Any(uu => uu.ConfirmUserId == t.UserId))).Count() - SystemDocumentCount = t.User.UserTypeRole.SystemDocNeedConfirmedUserTypeList.Where(cc => cc.NeedConfirmUserTypeId == t.User.UserTypeId).Select(y => y.SystemDocument).Count() - }); - - return query.ToList(); - } - - - /// - /// 从 文档的维度 先看到文档列表(系统文档+项目文档 以及需要确认的人数 和已经确认人数) 点击数字查看某文档下面人确认情况 - /// - /// - /// - [HttpPost] - [Obsolete] - public async Task> GetTrialSystemDocumentList(DocumentTrialUnionQuery inQuery) - { - var systemDocumentQueryable = _systemDocumentRepository - .WhereIf(!_userInfo.IsAdmin, t => t.IsDeleted == false) - .Select(t => new DocumentUnionWithUserStatView() - { - Id = t.Id, - IsSystemDoc = true, - CreateTime = t.CreateTime, - FullFilePath = t.Path, - IsDeleted = t.IsDeleted, - Name = t.Name, - Path = t.Path, - FileType = t.FileType.Value, - UpdateTime = t.UpdateTime, - SignViewMinimumMinutes = t.SignViewMinimumMinutes, - DocumentConfirmedUserCount = t.SystemDocConfirmedUserList.Count(), - - //DocumentUserCount= _trialUserRepository.Where(tu=>tu.TrialId== querySystemDocument.TrialId).Count(u=>t.NeedConfirmedUserTypeList.Any(cc=>cc.NeedConfirmUserTypeId== u.User.UserTypeId )) - DocumentUserCount = t.NeedConfirmedUserTypeList.SelectMany(u => u.UserTypeRole.UserList.SelectMany(b => b.UserTrials.Where(r => r.TrialId == inQuery.TrialId))).Count() - }); - - var trialDocQueryable = _trialDocumentRepository.Where(t => t.TrialId == inQuery.TrialId).Select(t => new DocumentUnionWithUserStatView() - { - Id = t.Id, - IsSystemDoc = false, - CreateTime = t.CreateTime, - FullFilePath = t.Path, - IsDeleted = t.IsDeleted, - Name = t.Name, - Path = t.Path, - FileType = t.FileType.Value, - UpdateTime = t.UpdateTime, - SignViewMinimumMinutes = t.SignViewMinimumMinutes, - - DocumentConfirmedUserCount = t.TrialDocConfirmedUserList.Count(), - DocumentUserCount = t.Trial.TrialUserList.Count(cc => t.NeedConfirmedUserTypeList.Any(k => k.NeedConfirmUserTypeId == cc.User.UserTypeId)) - - }); - - var unionQuery = systemDocumentQueryable.Union(trialDocQueryable) - .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) - .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId); - - return await unionQuery.ToPagedListAsync(inQuery); - } - #endregion - } diff --git a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs index e54aaf023..8cc1e024f 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs @@ -33,7 +33,7 @@ namespace IRaCIS.Core.Application.Service IRepository _taskMedicalReviewRepository, IRepository _readingGlobalTaskInfoRepository, IRepository _visitTaskRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _trialEmailNoticeUserRepository, IRepository _subjectRepository, IRepository _readModuleRepository, @@ -300,7 +300,7 @@ namespace IRaCIS.Core.Application.Service var answer = "否"; var isNeedSend = true; - var minUserIdList = _trialUserRepository.Where(t => t.User.UserTypeEnum == Domain.Share.UserTypeEnum.MIM && t.TrialId == taskInfo.TrialId).Select(t => t.UserId).ToList(); + var minUserIdList = _trialUserRoleRepository.Where(t => t.UserRole.UserTypeEnum == Domain.Share.UserTypeEnum.MIM && t.TrialId == taskInfo.TrialId).Select(t => t.UserId).ToList(); @@ -1199,7 +1199,7 @@ namespace IRaCIS.Core.Application.Service public async Task> GetTrialUserTypeSelectList(Guid trialId) { - var query = _trialUserRepository.Where(t => t.TrialId == trialId, false, true).IgnoreQueryFilters().Select(t => t.User.UserTypeRole).Distinct() + var query = _trialUserRoleRepository.Where(t => t.TrialId == trialId, false, true).IgnoreQueryFilters().Select(t => t.UserRole.UserTypeRole).Distinct() .ProjectTo(_mapper.ConfigurationProvider); @@ -1222,13 +1222,13 @@ namespace IRaCIS.Core.Application.Service var userTypeList = trialEmailNoticeConfig.TrialEmailNoticeUserList.Select(t => t.UserType).ToList(); - var query = _trialUserRepository.Where(t => t.TrialId == trialId && userTypeList.Contains(t.User.UserTypeEnum), false, true).IgnoreQueryFilters() + var query = _trialUserRoleRepository.Where(t => t.TrialId == trialId && userTypeList.Contains(t.UserRole.UserTypeEnum), false, true).IgnoreQueryFilters() .Select(t => new TrialSelectUser() { UserId = t.UserId, - UserName = t.User.UserName, - RealName = t.User.FullName, - UserTypeEnum = t.User.UserTypeEnum + UserName = t.UserRole.IdentityUser.UserName, + RealName = t.UserRole.FullName, + UserTypeEnum = t.UserRole.UserTypeEnum }).Distinct(); return await query.ToListAsync(); @@ -1525,7 +1525,7 @@ namespace IRaCIS.Core.Application.Service #region 人员还未加入,可以先配置邮件 历史废弃 - //var toUserList = await _trialUserRepository.Where(t => t.TrialId == config.TrialId) + //var toUserList = await _trialUserRoleRepository.Where(t => t.TrialId == config.TrialId) // .WhereIf(config.ToUserTypeList != null, t => config.ToUserTypeList.Contains(t.User.UserTypeEnum)) // .Select(t => new { t.User.EMail, t.User.FullName }).ToListAsync(); diff --git a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs index e78bebdf4..80159f0fb 100644 --- a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs @@ -40,7 +40,7 @@ namespace IRaCIS.Core.Application.Service // .ForMember(t => t.UserConfirmInfo, c => c.MapFrom(t => t.TrialDocConfirmedUserList.Where(u => u.ConfirmUserId == userId).FirstOrDefault())) // .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token)); ; - CreateMap() + CreateMap() .ForMember(d => d.UserName, c => c.MapFrom(t => t.User.UserName)) .ForMember(d => d.RealName, c => c.MapFrom(t => t.User.FullName)); @@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Service // .ForMember(d => d.RealName, c => c.MapFrom(t => t.User.LastName + " / " + t.User.FirstName)); - CreateMap(); + CreateMap(); CreateMap(); @@ -78,11 +78,11 @@ namespace IRaCIS.Core.Application.Service CreateMap(); - CreateMap() - .ForMember(d => d.Phone, c => c.MapFrom(t => t.User.Phone)) - .ForMember(d => d.Email, c => c.MapFrom(t => t.User.EMail)) - .ForMember(d => d.RealName, c => c.MapFrom(t => t.User.FullName)) - .ForMember(d => d.UserName, c => c.MapFrom(t => t.User.UserName)); + CreateMap() + .ForMember(d => d.Phone, c => c.MapFrom(t => t.UserRole.IdentityUser.Phone)) + .ForMember(d => d.Email, c => c.MapFrom(t => t.UserRole.IdentityUser.EMail)) + .ForMember(d => d.RealName, c => c.MapFrom(t => t.UserRole.IdentityUser.FullName)) + .ForMember(d => d.UserName, c => c.MapFrom(t => t.UserRole.IdentityUser.UserName)); CreateMap(); diff --git a/IRaCIS.Core.Application/Service/Financial/TrialPaymentPriceService.cs b/IRaCIS.Core.Application/Service/Financial/TrialPaymentPriceService.cs index ea24386e5..4b10985ac 100644 --- a/IRaCIS.Core.Application/Service/Financial/TrialPaymentPriceService.cs +++ b/IRaCIS.Core.Application/Service/Financial/TrialPaymentPriceService.cs @@ -66,7 +66,7 @@ namespace IRaCIS.Core.Application.Service SowPath = "", SowName = "", UpdateTime = DateTime.Now, - UpdateUserId = _userInfo.Id + UpdateUserId = _userInfo.UserRoleId }); return ResponseOutput.Result(success); diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index eca846b30..19df69976 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -65,19 +65,19 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc (t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.Random && t.TrialReadingCriterion.ImageUploadEnum != ReadingImageUpload.None)))) { //找到 非一致性分析,未签名,状态正常的 并且任务名称是TimePoint的 任务 - var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id + var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskBlindName == "Timepoint" && t.ReadingCategory == ReadingCategory.Visit && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze), true).ToListAsync(); if (needDealTaskList.Count > 0) { //已完成的访视任务数量(包含重阅的) - var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id + var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit); //已经处理过的任务名称的数量 - var haveDealedTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id + var haveDealedTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit && t.TaskBlindName != "Timepoint").Select(t => new { t.TaskBlindName, t.SourceSubjectVisitId, t.SouceReadModuleId }).ToListAsync(); @@ -153,7 +153,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var query = _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SourceSubjectVisitId != null - && t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect) + && t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect) //满足 有序,或者随机只看到当前任务的dicom 非dicom检查 .WhereIf(criterionInfo.IsReadingTaskViewInOrder != ReadingOrder.SubjectRandom && inQuery.VisitTaskId != null, t => t.Id == inQuery.VisitTaskId) .Select(u => new SubjectImageUploadDTO() @@ -402,7 +402,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc else { //在事务未完成前 防止前端重复提交 - await _fusionCache.SetAsync(CacheKeys.TrialTaskStudyUidDBLock(incommand.TrialId, incommand.VisitTaskId, incommand.Study.StudyInstanceUid), _userInfo.Id, TimeSpan.FromMinutes(1)); + await _fusionCache.SetAsync(CacheKeys.TrialTaskStudyUidDBLock(incommand.TrialId, incommand.VisitTaskId, incommand.Study.StudyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromMinutes(1)); } } @@ -653,7 +653,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { var subjectCode = inQuery.SubjectCode; var subjectId = inQuery.SubjectId; - var doctorUserId = _userInfo.Id; + var doctorUserId = _userInfo.UserRoleId; if (inQuery.VisitTaskId != null) { @@ -839,7 +839,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc public async Task> GetSubjectImageDownloadSelectList(IRReadingDownloadQuery inQuery) { - var doctorUserId = _userInfo.Id; + var doctorUserId = _userInfo.UserRoleId; var isAnalysisCreate = false; //要根据标准阅片顺序,确定是否查询单个任务的,还是查询所有的 @@ -1129,9 +1129,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var query = _trialImageDownloadRepository.Where(t => t.TrialId == inQuery.TrialId) .WhereIf(inQuery.SubjectCode.IsNotNullOrEmpty(), t => t.SubjectCode.Contains(inQuery.SubjectCode)) .WhereIf(inQuery.IP.IsNotNullOrEmpty(), t => t.IP.Contains(inQuery.IP)) - .WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUser.UserName.Contains(inQuery.Name) || t.CreateUser.FullName.Contains(inQuery.Name)) + .WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUserRole.IdentityUser.UserName.Contains(inQuery.Name) || t.CreateUserRole.FullName.Contains(inQuery.Name)) .WhereIf(inQuery.ImageType != null, t => t.ImageType == inQuery.ImageType) - .WhereIf(inQuery.UserType != null, t => t.CreateUser.UserTypeEnum == inQuery.UserType) + .WhereIf(inQuery.UserType != null, t => t.CreateUserRole.UserTypeEnum == inQuery.UserType) .WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess) .WhereIf(inQuery.DownloadStartTime != null, t => t.DownloadStartTime >= inQuery.DownloadStartTime) .WhereIf(inQuery.DownloadEndTime != null, t => t.DownloadEndTime <= inQuery.DownloadEndTime) @@ -1538,7 +1538,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc public async Task> GetIRUploadTaskList_Old(CRCUploadTaskQuery inQuery) { var query = _visitTaskRepository.Where(t => t.SubjectId == inQuery.SubjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId - && t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect) + && t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect) .ProjectTo(_mapper.ConfigurationProvider); diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs index 29fd733a7..e21e7b5ff 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs @@ -102,18 +102,13 @@ namespace IRaCIS.Core.Application.Services var resource = new ResourceInfo() { StudyId = imageShare.StudyId, - Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo() + Token = _tokenService.GetToken(new UserTokenInfo() { - Id = Guid.Empty, - IsReviewer = false, - IsAdmin = false, - RealName = "Share001", + UserRoleId = Guid.NewGuid(), + FullName = "Share001", UserName = "Share001", - Sex = 0, - //UserType = "ShareType", UserTypeEnum = UserTypeEnum.ShareImage, - Code = "ShareCode001", - })) + }) }; diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs index 838df7229..1e76770b7 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs @@ -4,6 +4,7 @@ // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 //-------------------------------------------------------------------- using IRaCIS.Core.Application.Filter; +using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using Medallion.Threading; using Microsoft.AspNetCore.Mvc; @@ -58,7 +59,7 @@ namespace IRaCIS.Core.Application.Contracts [UnitOfWork] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy) { @@ -70,6 +71,8 @@ namespace IRaCIS.Core.Application.Contracts } + + NoneDicomStudy? optEntity = null; var @lock = _distributedLockProvider.CreateLock($"NoneDicomCode"); @@ -85,6 +88,7 @@ namespace IRaCIS.Core.Application.Contracts optEntity = await _noneDicomStudyRepository.InsertFromDTOAsync(addOrEditNoneDicomStudy); optEntity.StudyCode = AppSettings.GetCodeStr(optEntity.Code, nameof(NoneDicomStudy)); + } else { @@ -105,7 +109,7 @@ namespace IRaCIS.Core.Application.Contracts } - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] [HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{noneDicomStudyId:guid}")] public async Task DeleteNoneDicomStudy(Guid noneDicomStudyId, Guid subjectVisitId) { @@ -128,7 +132,7 @@ namespace IRaCIS.Core.Application.Contracts [HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{noneDicomStudyFileId:guid}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task DeleteNoneDicomStudyFile(Guid noneDicomStudyFileId, Guid subjectVisitId) { //提交了 但是IQC同意的时候 是可以删除的 | 普通提交后也不能删除 @@ -155,7 +159,7 @@ namespace IRaCIS.Core.Application.Contracts public async Task> GetNoneDicomStudyFileList(Guid noneDicomStudyId) { return await _noneDicomStudyFileRepository.Where(t => t.NoneDicomStudyId == noneDicomStudyId) - .ProjectTo(_mapper.ConfigurationProvider).OrderBy(t=>t.CreateTime).ToListAsync(); + .ProjectTo(_mapper.ConfigurationProvider).OrderBy(t => t.CreateTime).ToListAsync(); } [HttpGet("{subjectVisitId:guid}")] diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs index a39763263..460dfc729 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs @@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.Services [HttpGet, Route("{studyId:guid}")] public async Task>> List(Guid studyId) { - + //断点 var seriesList = await _seriesRepository.Where(s => s.StudyId == studyId).OrderBy(s => s.SeriesNumber). ThenBy(s => s.SeriesTime).ThenBy(s => s.CreateTime) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index 48005b743..ccee68d94 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -65,7 +65,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc } - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task PreArchiveDicomStudy(PreArchiveDicomStudyCommand preArchiveStudyCommand) { @@ -99,20 +99,20 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc if (visitTaskId != null) { var cacheValue = _fusionCache.GetOrDefault(CacheKeys.TrialTaskStudyUidUploading(trialId, visitTaskId.Value, studyInstanceUid)); - if (cacheValue != Guid.Empty && cacheValue != _userInfo.Id) + if (cacheValue != Guid.Empty && cacheValue != _userInfo.UserRoleId) { //---当前已有人正在上传和归档该检查! return ResponseOutput.NotOk(I18n.T("UploadDownLoad_ArchiveInProgress")); } else { - await _fusionCache.SetAsync(CacheKeys.TrialTaskStudyUidUploading(trialId, visitTaskId.Value, studyInstanceUid), _userInfo.Id, TimeSpan.FromSeconds(15)); + await _fusionCache.SetAsync(CacheKeys.TrialTaskStudyUidUploading(trialId, visitTaskId.Value, studyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromSeconds(15)); } } else { - await _fusionCache.SetAsync(CacheKeys.TrialStudyUidUploading(trialId, studyInstanceUid), _userInfo.Id, TimeSpan.FromSeconds(15)); + await _fusionCache.SetAsync(CacheKeys.TrialStudyUidUploading(trialId, studyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromSeconds(15)); } @@ -122,7 +122,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task AddOrUpdateArchiveStudy(NewArchiveStudyCommand incommand) { @@ -139,7 +139,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc else { //在事务未完成前 防止前端重复提交 - await _fusionCache.SetAsync(CacheKeys.TrialStudyUidDBLock(incommand.TrialId, incommand.Study.StudyInstanceUid), _userInfo.Id, TimeSpan.FromMinutes(3)); + await _fusionCache.SetAsync(CacheKeys.TrialStudyUidDBLock(incommand.TrialId, incommand.Study.StudyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromMinutes(3)); } } @@ -254,6 +254,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc } } + findStudy = addStudy; + } else { @@ -321,6 +323,20 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc } + #region 只配置单个部位自动赋值 + //项目配置的影像部位 + var trialBodyParts = _trialRepository.Where(t => t.Id == trialId).Select(t => t.BodyPartTypes).FirstOrDefault(); + + var trialBodyPartList = trialBodyParts.Split('|', StringSplitOptions.RemoveEmptyEntries); + + if (trialBodyPartList.Count() == 1) + { + var first = trialBodyPartList.First(); + findStudy.BodyPartForEdit = first; + } + #endregion + + var @lock2 = _distributedLockProvider.CreateLock($"StudyCommit"); using (await @lock2.AcquireAsync()) @@ -357,7 +373,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var svExpression = QCCommon.GetDicomStudySubjectVisitFilter(inQuery.VisitPlanArray); var dicomStudyQuery = _dicomStudyRepository.Where(t => t.TrialId == inQuery.TrialId) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) //.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo)) .WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo)) @@ -394,7 +410,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc TrialSiteCode = t.Subject.TrialSite.TrialSiteCode, - Uploader = t.CreateUser.UserName, + Uploader = t.CreateUserRole.IdentityUser.UserName, UploadTime = t.CreateTime @@ -406,7 +422,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var nodeDicomStudyQuery = _noneDicomStudyRepository.Where(t => t.TrialId == inQuery.TrialId) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) //.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo)) .WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression2) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo)) @@ -444,7 +460,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc TrialSiteCode = t.Subject.TrialSite.TrialSiteCode, - Uploader = t.CreateUser.UserName, + Uploader = t.CreateUserRole.IdentityUser.UserName, UploadTime = t.CreateTime @@ -468,7 +484,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(inQuery.VisitPlanArray); var StudyMonitorQuery = _studyMonitorRepository.Where(t => t.TrialId == inQuery.TrialId, ignoreQueryFilters: true) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) //.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo)) .WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo)) @@ -476,7 +492,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc .WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectId == inQuery.SubjectVisitId) .WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.IsDicom != null, t => t.IsDicom == inQuery.IsDicom) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUser.UserName.Contains(inQuery.Uploader)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUserRole.IdentityUser.UserName.Contains(inQuery.Uploader)) .WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.StudyCode), t => t.StudyCode.Contains(inQuery.StudyCode)) .WhereIf(inQuery.UploadStartTime != null, t => t.UploadStartTime >= inQuery.UploadStartTime) @@ -499,7 +515,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc TrialSiteCode = t.Subject.TrialSite.TrialSiteCode, - Uploader = t.CreateUser.UserName, + Uploader = t.CreateUserRole.IdentityUser.UserName, UploadTime = t.CreateTime, @@ -615,7 +631,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc public async Task>> VerifyTaskStudyAllowUploadAsync(VerifyTaskUploadOrReupload verifyInfo) { - var queryStudy = _visitTaskRepository.Where(t => t.SubjectId == verifyInfo.SubjectId && t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.Id).Select(u => new + var queryStudy = _visitTaskRepository.Where(t => t.SubjectId == verifyInfo.SubjectId && t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.UserRoleId).Select(u => new { VisitTaskId = u.Id, SourceSubjectVisitId = u.SourceSubjectVisitId, @@ -654,7 +670,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var result = new VerifyStudyUploadResult(); - if (_fusionCache.GetOrDefault($"StudyUid_{trialId}_{studyInstanceUid}") != _userInfo.Id) + if (_fusionCache.GetOrDefault($"StudyUid_{trialId}_{studyInstanceUid}") != _userInfo.UserRoleId) { result.AllowUpload = false; @@ -704,7 +720,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { if (result.AllowReUpload || result.AllowUpload) { - await _fusionCache.SetAsync($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30)); + await _fusionCache.SetAsync($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.UserRoleId, TimeSpan.FromSeconds(30)); } else @@ -800,7 +816,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var result = new VerifyStudyUploadResult(); - if (cacheUserId.GetValueOrDefault() != _userInfo.Id && cacheUserId.HasValue) + if (cacheUserId.GetValueOrDefault() != _userInfo.UserRoleId && cacheUserId.HasValue) { result.AllowUpload = false; @@ -869,7 +885,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { if (result.AllowReUpload || result.AllowUpload) { - _fusionCache.Set(CacheKeys.TrialStudyUidUploading(trialId, studyInstanceUid), _userInfo.Id, TimeSpan.FromSeconds(30)); + _fusionCache.Set(CacheKeys.TrialStudyUidUploading(trialId, studyInstanceUid), _userInfo.UserRoleId, TimeSpan.FromSeconds(30)); } else { diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs index 7f2159893..72c31db41 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs @@ -40,8 +40,8 @@ namespace IRaCIS.Core.Application.Service CreateMap().IncludeMembers(t => t.Subject, u => u.SubjectVisit) .ForMember(d => d.SiteName, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteName)) - .ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.CreateUser.FirstName)) - .ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.CreateUser.LastName)) + .ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.FirstName)) + .ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.LastName)) .ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime)); CreateMap(); @@ -66,7 +66,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(o => o.IsCompleteClinicalData, t => t.MapFrom(u => !u.ReadingClinicalDataList.Any(x => x.ReadingClinicalDataPDFList.Count() == 0))) .ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime)) - .ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUser.LastName + " / " + u.CreateUser.FirstName)) + .ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUserRole.IdentityUser.FullName)) .ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id)) .ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t => t.FailedFileCount > 0))) .ForMember(o => o.Modalities, t => t.MapFrom(u => string.Join('、', u.SeriesList.Select(t => t.Modality).Distinct()))); @@ -141,9 +141,9 @@ namespace IRaCIS.Core.Application.Service ; CreateMap() - .ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUser.FullName)) - .ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUser.UserTypeEnum)) - .ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName)) + .ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUserRole.FullName)) + .ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUserRole.UserTypeEnum)) + .ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.UserName)) .ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode)) ; diff --git a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs index 6bf2306e7..15f2cb8f5 100644 --- a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs @@ -29,7 +29,7 @@ namespace IRaCIS.Core.Application.Service IRepository _qCChallengeRepository, IRepository _dictionaryRepository, IRepository _trialRepository, - IRepository _userRepository, + IRepository _userRoleRepository, IRepository _checkChallengeDialogRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IFrontAuditConfigService { @@ -60,19 +60,19 @@ namespace IRaCIS.Core.Application.Service { case AccessToDialogueEnum.Question: - AccessToDialogueOutDto title = (await _qCChallengeRepository.Where(x => x.Id == inDto.Id).Include(x => x.CreateUser).Select(x => new AccessToDialogueOutDto() + AccessToDialogueOutDto title = (await _qCChallengeRepository.Where(x => x.Id == inDto.Id).Include(x => x.CreateUserRole).Select(x => new AccessToDialogueOutDto() { CreateTime = x.CreateTime, - CreateUserName = x.CreateUser.UserName, + CreateUserName = x.CreateUserRole.IdentityUser.UserName, TalkContent = x.Content, IsTitle = true, }).FirstOrDefaultAsync()) ?? new AccessToDialogueOutDto(); - data = await _qCChallengeDialogRepository.Where(x => x.QCChallengeId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUser).Select( + data = await _qCChallengeDialogRepository.Where(x => x.QCChallengeId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUserRole).Select( x => new AccessToDialogueOutDto() { CreateTime = x.CreateTime, - CreateUserName = x.CreateUser.UserName, + CreateUserName = x.CreateUserRole.IdentityUser.UserName, TalkContent = x.TalkContent } ).OrderBy(x => x.CreateTime).ToListAsync(); @@ -81,11 +81,11 @@ namespace IRaCIS.Core.Application.Service break; case AccessToDialogueEnum.Consistency: - data = await _checkChallengeDialogRepository.Where(x => x.SubjectVisitId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUser).Select( + data = await _checkChallengeDialogRepository.Where(x => x.SubjectVisitId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUserRole).Select( x => new AccessToDialogueOutDto() { CreateTime = x.CreateTime, - CreateUserName = x.CreateUser.UserName, + CreateUserName = x.CreateUserRole.IdentityUser.UserName, TalkContent = x.TalkContent } ).OrderBy(x => x.CreateTime).ToListAsync(); @@ -389,8 +389,6 @@ namespace IRaCIS.Core.Application.Service objectLsit.Add(newNamepDic); } - - await AddJsonObjectToDic(relationParentInspection.Id, relationParentInspection.ObjectRelationParentId, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit); await AddJsonObjectToDic(relationParentInspection.Id, relationParentInspection.ObjectRelationParentId2, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit); await AddJsonObjectToDic(relationParentInspection.Id, relationParentInspection.ObjectRelationParentId3, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit); @@ -401,7 +399,7 @@ namespace IRaCIS.Core.Application.Service //用户的数据稽查没有 临时处理 - var userObj = await _userRepository.Where(t => t.Id == objectRelationParentId).Select(t => new { UserRealName = t.FullName, t.Phone, t.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.EMail, t.OrganizationName }).FirstOrDefaultAsync(); + var userObj = await _userRoleRepository.Where(t => t.Id == objectRelationParentId).Select(t => new { UserRealName = t.IdentityUser.FullName, t.IdentityUser.Phone, t.IdentityUser.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.IdentityUser.EMail, t.IdentityUser.OrganizationName }).FirstOrDefaultAsync(); if (userObj != null) { @@ -1074,14 +1072,14 @@ namespace IRaCIS.Core.Application.Service //IsConfig = lst.Select(x => x.IsConfig).FirstOrDefault(), IsShowParent = lst.Select(x => x.IsShowParent).FirstOrDefault(), ParentId = item.AddItemGuid, - CreateUserId = _userInfo.Id, + CreateUserId = _userInfo.UserRoleId, IsEnable = lst.Select(x => x.IsEnable).FirstOrDefault(), DictionaryKey = lst.Select(x => x.DictionaryKey).FirstOrDefault(), EnumType = lst.Select(x => x.EnumType).FirstOrDefault(), UpdateTime = DateTime.Now, ValueCN = lst.Select(x => x.ValueCN).FirstOrDefault(), Value = lst.Max(x => x.Value), - UpdateUserId = _userInfo.Id, + UpdateUserId = _userInfo.UserRoleId, ChildrenTypeId = additem?.ChildrenTypeId, ModuleTypeId = additem?.ModuleTypeId, ObjectTypeId = additem?.ObjectTypeId, diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index 1633381e2..96b4c95f1 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -12,7 +12,8 @@ namespace IRaCIS.Core.Application.Service.Inspection public class InspectionService(IRepository _dataInspectionRepository, IRepository _dictionaryRepository, IRepository _trialSignRepository, - IRepository _userRepository, + IRepository _identityUserRepository, + IRepository _userRoleRepository, IRepository _trialSiteRepository, IRepository _trialRepository, IRepository _subjectRepository, @@ -53,7 +54,7 @@ namespace IRaCIS.Core.Application.Service.Inspection from leftsubjectVisit in subjectVisittemp.DefaultIfEmpty() join parent in _dataInspectionRepository.Where() on data.ParentId equals parent.Id into parenttemp from leftparent in parenttemp.DefaultIfEmpty() - join user in _userRepository.Where().IgnoreQueryFilters() on data.CreateUserId equals user.Id into usertemp + join user in _userRoleRepository.Where().IgnoreQueryFilters() on data.CreateUserId equals user.Id into usertemp from leftuser in usertemp.DefaultIfEmpty() join usertype in _userTypeRepository.Where().IgnoreQueryFilters() on leftuser.UserTypeId equals usertype.Id into usertypetemp from leftusertype in usertypetemp.DefaultIfEmpty() @@ -105,7 +106,7 @@ namespace IRaCIS.Core.Application.Service.Inspection //OptType = data.OptType, IP = data.IP, Reason = data.Reason, - IsSign = leftfrontAuditConfig.IsHaveSign, + IsSign = leftfrontAuditConfig.IsHaveSign && lefttrialSign.SignText!=null&& lefttrialSign.SignText!=string.Empty, SignId = data.SignId, ParentId = data.ParentId, ChildrenTypeId = data.ChildrenTypeId, @@ -257,7 +258,7 @@ namespace IRaCIS.Core.Application.Service.Inspection /// 验证用户签名信息 /// public async Task VerifySignatureAsync(SignDTO signDTO) { - var user = await _userRepository.FirstOrDefaultAsync(u => u.UserName == signDTO.UserName && u.Password == signDTO.PassWord); + var user = await _identityUserRepository.FirstOrDefaultAsync(u => u.UserName == signDTO.UserName && u.Password == signDTO.PassWord); if (user == null) { throw new BusinessValidationFailedException(_localizer["User_CheckNameOrPw"]); diff --git a/IRaCIS.Core.Application/Service/Institution/CROService.cs b/IRaCIS.Core.Application/Service/Institution/CROService.cs index dbe34930a..236cba181 100644 --- a/IRaCIS.Core.Application/Service/Institution/CROService.cs +++ b/IRaCIS.Core.Application/Service/Institution/CROService.cs @@ -65,7 +65,7 @@ namespace IRaCIS.Core.Application.Service //---该CRO已经参与项目,不能被删除。 return ResponseOutput.NotOk(_localizer["CRO_InProject"]); } - //if (_userRepository.Find().Any(t => t.OrganizationId == cROCompanyId)) + //if (_userRoleRepository.Find().Any(t => t.OrganizationId == cROCompanyId)) //{ // return ResponseOutput.NotOk("该CRO下存在用户,暂时无法删除。"); //} diff --git a/IRaCIS.Core.Application/Service/Institution/SiteService.cs b/IRaCIS.Core.Application/Service/Institution/SiteService.cs index 4a12a4c3e..6ed3ef3d8 100644 --- a/IRaCIS.Core.Application/Service/Institution/SiteService.cs +++ b/IRaCIS.Core.Application/Service/Institution/SiteService.cs @@ -9,7 +9,7 @@ namespace IRaCIS.Core.Application.Service { [ApiExplorerSettings(GroupName = "Institution")] public class SiteService(IRepository _siteRepository, - IRepository _trialSiteUserRepository, + IRepository _trialSiteUserRoleRepository, IDistributedLockProvider _distributedLockProvider, IRepository _trialSiteRepository, IRepository _hospitalRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISiteService @@ -114,7 +114,7 @@ namespace IRaCIS.Core.Application.Service public async Task DeleteSite(Guid siteId) { - if (await _trialSiteUserRepository.AnyAsync(t => t.TrialSite.SiteId == siteId)) + if (await _trialSiteUserRoleRepository.AnyAsync(t => t.TrialSite.SiteId == siteId)) { //---该中心已经加入项目,不可以被删除。 return ResponseOutput.NotOk(_localizer["Site_InProject"]); diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs index e8f78bfc0..39378df0e 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs @@ -12,30 +12,33 @@ namespace IRaCIS.Core.Application.ViewModel public Guid? Id { get; set; } public string IP { get; set; } - public string LoginFaildName { get; set; } + public string ActionUserType { get; set; } public int OptType { get; set; } + public string? ActionUserName { get; set; } - public string? LoginUserName { get; set; } - - public UserTypeEnum? LoginUserTypeEnum { get; set; } + //public string ActionUserRoleShortName { get; set; } public DateTime CreateTime { get; set; } public Guid CreateUserId { get; set; } + public string TargetIdentityUserName { get; set; } + public bool IsLoginUncommonly { get; set; } - public string? OptUserName { get; set; } - - public UserTypeEnum? OptUserTypeEnum { get; set; } - - public Guid? LoginUserId { get; set; } - - public Guid? OptUserId { get; set; } + + public string JsonObj { get; set; } public string IPRegion { get; set; } } + public class SendMfaCommand + { + public Guid IdentityUserId { get; set; } + + public UserMFAType MFAType { get; set; } = UserMFAType.Login; + } + ///UserLogQuery 列表查询参数模型 public class UserLogQuery : PageInput { @@ -57,7 +60,9 @@ namespace IRaCIS.Core.Application.ViewModel public Guid? UserTypeId { get; set; } - public Guid? UserId { get; set; } + public Guid? IdentityUserId { get; set; } + + public bool? IsLoginUncommonly { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index b68d648e1..a523e0e1f 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -21,7 +21,41 @@ namespace IRaCIS.Application.Contracts public Guid? UserId { get; set; } } + public class IRCLoginDto + { + public string UserName { get; set; } + public string Password { get; set; } + } + public class LoginSelectRoleReturn + { + public string JwtStr { get; set; } + public bool IsMutiAccount => AccountList.Count > 1; + + public List AccountList { get; set; } = new List(); + } + + public class UserAccountInfo + { + public Guid Id { get; set; } + public Guid IdentityUserId { get; set; } + public string UserName { get; set; } = string.Empty; + public string FullName { get; set; } = string.Empty; + + public string Phone { get; set; } = string.Empty; + public string EMail { get; set; } = string.Empty; + + public Guid UserTypeId { get; set; } + + public UserTypeEnum UserTypeEnum { get; set; } + + public string UserTypeShortName { get; set; } + + public bool IsUserRoleDisabled { get; set; } + + + + } public class LoginReturnDTO { public UserBasicInfo BasicInfo { get; set; } = new UserBasicInfo(); @@ -33,43 +67,51 @@ namespace IRaCIS.Application.Contracts } + public class IRCLoginReturnDTO + { + public UserBasicInfo BasicInfo { get; set; } = new UserBasicInfo(); + public string JWTStr { get; set; } = string.Empty; + + public bool IsMFA { get; set; } = false; + + public SystemEmailSendConfigView CompanyInfo { get; set; } + + } + public class UserBasicInfo { - public Guid Id { get; set; } + public Guid IdentityUserId { get; set; } + + public Guid UserRoleId { get; set; } + + public bool IsMutiAccount => AccountList?.Count > 1; + public List AccountList { get; set; } + + public string UserName { get; set; } = string.Empty; - public string RealName { get; set; } = string.Empty; + public string FullName { get; set; } = string.Empty; public int? Sex { get; set; } // 1-男 2-女 + public string UserCode { get; set; } + public string EMail { get; set; } + + public int Status { get; set; } + public bool IsTestUser { get; set; } + public bool IsZhiZhun { get; set; } + public bool IsFirstAdd { get; set; } + + public bool NeedChangePassWord { get; set; } = false; - /// - /// LastLoginIP - /// + public bool PasswordChanged { get; set; } + + public int LoginState { get; set; } = 0; public string LastLoginIP { get; set; } = string.Empty; - - public UserTypeEnum UserTypeEnum { get; set; } - + public DateTime? LastLoginTime { get; set; } /// /// 上一次修改密码的时间 /// public DateTime? LastChangePassWordTime { get; set; } - public bool IsTestUser { get; set; } - public bool IsAdmin { get; set; } = false; - public string UserTypeShortName { get; set; } = string.Empty; - public bool PasswordChanged { get; set; } - public int Status { get; set; } - public Guid UserTypeId { get; set; } - public string Code { get; set; } = String.Empty; - - public string PermissionStr { get; set; } = String.Empty; - - public string EMail { get; set; } = string.Empty; - public bool IsFirstAdd { get; set; } - - public bool IsZhiZhun { get; set; } - public bool IsReviewer { get; set; } = false; - - public int LoginState { get; set; } = 0; } @@ -119,16 +161,18 @@ namespace IRaCIS.Application.Contracts public class UserDetailDTO : UserInfo { - public bool CanEditUserType { get; set; } + //public bool CanEditUserType { get; set; } + + public string FullName { get; set; } + + public Guid Id { get; set; } + + public List AccountList { get; set; } } public class UserInfo { - public Guid Id { get; set; } public string UserName { get; set; } = string.Empty; - public string Password { get; set; } = string.Empty; - public string RealName { get; set; } = string.Empty; - public string FirstName { get; set; } = string.Empty; @@ -139,34 +183,19 @@ namespace IRaCIS.Application.Contracts public string Phone { get; set; } = string.Empty; public string EMail { get; set; } = string.Empty; - public Guid UserTypeId { get; set; } = Guid.Empty; public string UserCode { get; set; } = string.Empty; public bool IsZhiZhun { get; set; } - public string UserType { get; set; } = string.Empty; - - public string UserTypeShortName { get; set; } = string.Empty; - - - public UserTypeEnum UserTypeEnum { get; set; } - - - - //public Guid OrganizationTypeId { get; set; } = Guid.Empty; - //public string OrganizationType { get; set; } = String.Empty; - //public Guid OrganizationId { get; set; } public string OrganizationName { get; set; } = string.Empty; - - public string DepartmentName { get; set; } = String.Empty; public string PositionName { get; set; } = String.Empty; public bool IsTestUser { get; set; } - public DateTime? LastLoginTime { get; set; } + } /// @@ -179,13 +208,59 @@ namespace IRaCIS.Application.Contracts } + public class UserBasicInfoCommand : UserInfo + { + public Guid Id { get; set; } + } + + public class UpdateUserRolesDto + { + public Guid Id { get; set; } + + public List UserRoleList { get; set; } + } + public class UserCommand : UserInfo { + public Guid? Id { get; set; } + + public List UserRoleList { get; set; } + + public string BaseUrl { get; set; } = string.Empty; public string RouteUrl { get; set; } = string.Empty; - //public string FirstName { get; set; } - //public string LastName { get; set; } + } + + + public class NewUserSendEmailCommand + { + public Guid IdentityUserId { get; set; } + public string BaseUrl { get; set; } = string.Empty; + public string RouteUrl { get; set; } = string.Empty; + + } + + public class IdentityUserTypeDTO : UserAddUserType + { + public Guid Id { get; set; } + public string UserTypeShortName { get; set; } + + public DateTime CreateTime { get; set; } + + public DateTime UpdateTime { get; set; } + } + + public class UserAddUserType + { + + public UserTypeEnum UserTypeEnum { get; set; } + + public Guid UserTypeId { get; set; } + + public bool IsUserRoleDisabled { get; set; } + + } public class EditPasswordCommand @@ -200,7 +275,7 @@ namespace IRaCIS.Application.Contracts public class UserAccountDto { - public Guid UserId { get; set; } + public Guid Id { get; set; } public string UserName { get; set; } = string.Empty; @@ -231,6 +306,11 @@ namespace IRaCIS.Application.Contracts public DateTime? BeginLastLoginTime { get; set; } public DateTime? EndLastLoginTime { get; set; } + + + public DateTime? BeginLastChangePassWordTime { get; set; } + + public DateTime? EndLastChangePassWordTime { get; set; } } public class UserRoleInfoDTO @@ -241,26 +321,25 @@ namespace IRaCIS.Application.Contracts public class UserListDTO : UserInfo { - [JsonIgnore] - public Guid testGuid { get; set; } - public bool CanEditUserType { get; set; } + //public bool CanEditUserType { get; set; } + + public bool IsFirstAdd { get; set; } + + public DateTime? LastLoginTime { get; set; } public DateTime CreateTime { get; set; } - public List RoleNameArray { get; set; } = new List(); - public IEnumerable RoleNameList { get; set; } = new List(); + public Guid Id { get; set; } + + public string FullName { get; set; } + + public DateTime? LastChangePassWordTime { get; set; } + + public List UserRoleList { get; set; } } - public class UserIdRoleName : RoleDTO - { - public Guid UserId { get; set; } - } - public class UserIdRoleNameList - { - public Guid UserId { get; set; } - public IEnumerable RoleList { get; set; } = new List(); - } + public class AllowAnonymousResetPasswordCommand diff --git a/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs b/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs index dd3778899..473297ed3 100644 --- a/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs +++ b/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs @@ -1,4 +1,5 @@ using IRaCIS.Application.Contracts; +using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Application.Service @@ -6,19 +7,19 @@ namespace IRaCIS.Core.Application.Service public interface IUserService { Task> AddUser(UserCommand userAddModel); - Task DeleteUser(Guid userId); - Task GetUser(Guid id); + //Task DeleteUser(Guid userId); + //Task GetUser(Guid id); Task> GetUserList(UserListQueryDTO param); Task> Login(string userName, string password); - Task VerifyMFACodeAsync(Guid userId, string Code); + Task VerifyMFACodeAsync(string Code); - Task SendMFAEmail(Guid userId, int mfaType = 0); + Task SendMFAEmail(SendMfaCommand sendMfa); Task GetUserBasicInfo(Guid userId, string pwd); Task ModifyPassword(EditPasswordCommand editPwModel); Task ResetPassword(Guid userId); Task UpdateUser(UserCommand model); - Task UpdateUserState(Guid userId, UserStateEnum state); + //Task UpdateUserState(Guid userId, UserStateEnum state); //Task SendVerificationCode(string emailOrPhone, VerifyType verificationType, bool isReviewer = false); //Task SetNewPassword(ResetPasswordCommand resetPwdModel); diff --git a/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs b/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs index cfde80063..0c37fec09 100644 --- a/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs +++ b/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs @@ -48,7 +48,7 @@ namespace IRaCIS.Core.Application.Service if (entity.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished) { - entity.PublishedUserId = _userInfo.Id; + entity.PublishedUserId = _userInfo.UserRoleId; entity.PublishedTime = DateTime.Now; } await _systemNoticeRepository.SaveChangesAsync(); @@ -61,7 +61,7 @@ namespace IRaCIS.Core.Application.Service if (addOrEditSystemNotice.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished && systemNotice.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.NotPublish) { - systemNotice.PublishedUserId = _userInfo.Id; + systemNotice.PublishedUserId = _userInfo.UserRoleId; systemNotice.PublishedTime = DateTime.Now; } else if (addOrEditSystemNotice.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.NotPublish && systemNotice.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished) @@ -125,7 +125,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.NoticeTypeEnum != null, t => t.NoticeTypeEnum == inQuery.NoticeTypeEnum) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.FileName), t => t.FileName.Contains(inQuery.FileName)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.NoticeContent), t => t.NoticeContent.Contains(inQuery.NoticeContent)) - .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id }); + .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.UserRoleId }); return await systemNoticeQueryable.ToPagedListAsync(inQuery); } @@ -137,9 +137,9 @@ namespace IRaCIS.Core.Application.Service var appDateTimeNow = DateTime.Now; var query = _systemNoticeRepository - .Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id)) + .Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.UserRoleId)) .Where(t => t.EndDate == null || t.EndDate != null && t.EndDate > appDateTimeNow) - .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id }); + .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.UserRoleId }); return await query.ToListAsync(); } diff --git a/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs b/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs index 8ed020093..8b15454a4 100644 --- a/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs @@ -32,15 +32,15 @@ namespace IRaCIS.Core.Application.Service var isCRCOrIR = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer; var userFeedBackQueryable = _userFeedBackRepository - .WhereIf(isCRCOrIR, t => t.CreateUserId == _userInfo.Id) + .WhereIf(isCRCOrIR, t => t.CreateUserId == _userInfo.UserRoleId) .WhereIf(inQuery.State != null, t => t.State == inQuery.State) .WhereIf(inQuery.TrialId != null, t => t.TrialId == inQuery.TrialId) .WhereIf(inQuery.QuestionType != null, t => t.QuestionType == inQuery.QuestionType) .WhereIf(inQuery.BeginCreatime != null, t => t.CreateTime >= inQuery.BeginCreatime) .WhereIf(inQuery.EndCreatime != null, t => t.CreateTime == inQuery.EndCreatime) - .WhereIf(inQuery.UserTypeEnum != null, t => t.CreateUser.UserTypeEnum == inQuery.UserTypeEnum) - .WhereIf(!string.IsNullOrEmpty(inQuery.FeedBackUserKeyInfo), t => t.CreateUser.FullName.Contains(inQuery.FeedBackUserKeyInfo) || t.CreateUser.UserName.Contains(inQuery.FeedBackUserKeyInfo)) + .WhereIf(inQuery.UserTypeEnum != null, t => t.CreateUserRole.UserTypeEnum == inQuery.UserTypeEnum) + .WhereIf(!string.IsNullOrEmpty(inQuery.FeedBackUserKeyInfo), t => t.CreateUserRole.FullName.Contains(inQuery.FeedBackUserKeyInfo) || t.CreateUserRole.IdentityUser.UserName.Contains(inQuery.FeedBackUserKeyInfo)) .WhereIf(!string.IsNullOrEmpty(inQuery.QuestionDescription), t => t.QuestionDescription.Contains(inQuery.QuestionDescription)) .WhereIf(!string.IsNullOrEmpty(inQuery.TrialKeyInfo), t => t.Trial.ExperimentName.Contains(inQuery.TrialKeyInfo) || t.Trial.TrialCode.Contains(inQuery.TrialKeyInfo)) .WhereIf(!string.IsNullOrEmpty(inQuery.SubejctAndVisitKeyInfo), t => t.Subject.Code.Contains(inQuery.SubejctAndVisitKeyInfo) || t.SubjectVisit.VisitName.Contains(inQuery.SubejctAndVisitKeyInfo)) @@ -61,8 +61,10 @@ namespace IRaCIS.Core.Application.Service throw new BusinessValidationFailedException("Id 或者VisitTaskId 必传一个"); } - var result = await _userFeedBackRepository.WhereIf(inQuery.Id == null, t => t.VisitTaskId == inQuery.VisitTaskId) - .WhereIf(inQuery.VisitTaskId == null, t => t.Id == inQuery.Id).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + var result = await _userFeedBackRepository + .WhereIf(inQuery.Id != null, t => t.Id == inQuery.Id) + .WhereIf(inQuery.VisitTaskId != null, t => t.VisitTaskId == inQuery.VisitTaskId) + .ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 0a95a78dc..5e76c3dcb 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -1,50 +1,59 @@ -using IP2Region.Net.Abstractions; +using DocumentFormat.OpenXml.Spreadsheet; +using DocumentFormat.OpenXml.Wordprocessing; +using IP2Region.Net.Abstractions; using IRaCIS.Application.Contracts; +using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Helper; +using IRaCIS.Core.Application.Service.OAuth; using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infrastructure; +using MassTransit; using Medallion.Threading; using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; +using Org.BouncyCastle.Utilities.Encoders; using Panda.DynamicWebApi.Attributes; using System.Text.RegularExpressions; using ZiggyCreatures.Caching.Fusion; + using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO; namespace IRaCIS.Core.Application.Service { [ApiExplorerSettings(GroupName = "Management")] - public class UserService(IRepository _userRepository, + public class UserService(IRepository _userRoleRepository, IMailVerificationService _mailVerificationService, IRepository _verificationCodeRepository, - IRepository _userTrialRepository, + IRepository _userTrialRepository, IRepository _userLogRepository, IRepository _userPassWordLogRepository, IDistributedLockProvider _distributedLockProvider, IRepository _trialRepository, IOptionsMonitor _verifyConfig, IOptionsMonitor systemEmailConfig, + IRepository _identityUserRepository, ISearcher _searcher, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IUserService { private SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue; - private async Task VerifyUserNameAsync(Guid? userId, string userName) + private async Task VerifyUserNameAsync(Guid? identityUserId, string userName) { - if (await _userRepository.WhereIf(userId != null, t => t.Id != userId).AnyAsync(t => t.UserName == userName)) + if (await _identityUserRepository.WhereIf(identityUserId != null, t => t.Id != identityUserId).AnyAsync(t => t.UserName == userName)) { //---用户名已经存在。 throw new BusinessValidationFailedException(_localizer["User_UsernameExist"]); } } - private async Task VerifyUserPhoneAsync(Guid? userId, Guid userTypeId, string phone) + private async Task VerifyUserPhoneAsync(Guid? identityUserId, string phone) { - if (await _userRepository.WhereIf(userId != null, t => t.Id != userId).AnyAsync(t => (t.Phone == phone && t.UserTypeId == userTypeId))) + if (await _identityUserRepository.WhereIf(identityUserId != null, t => t.Id != identityUserId).AnyAsync(t => (t.Phone == phone))) { //---该用户类型中已存在具有相同的电话的用户。 throw new BusinessValidationFailedException(_localizer["User_PhoneDup"]); @@ -52,18 +61,18 @@ namespace IRaCIS.Core.Application.Service } - private async Task VerifyUserEmailAsync(Guid? userId, Guid userTypeId, string email) + private async Task VerifyUserEmailAsync(Guid? identityUserId, string email) { - if (await _userRepository.WhereIf(userId != null, t => t.Id != userId).AnyAsync(t => (t.EMail == email && t.UserTypeId == userTypeId))) + if (await _identityUserRepository.WhereIf(identityUserId != null, t => t.Id != identityUserId).AnyAsync(t => t.EMail == email)) { //---该用户类型中已存在具有相同邮箱的用户。 throw new BusinessValidationFailedException(_localizer["User_EmailDup"]); } } - private async Task VerifyUserPwdAsync(Guid userId, string newPwd, string? oldPwd = null) + private async Task VerifyUserPwdAsync(Guid identityUserId, string newPwd, string? oldPwd = null) { - //var dbUser = (await _userRepository.FirstOrDefaultAsync(t => t.Id == userId)).IfNullThrowException(); + //var dbUser = (await _userRoleRepository.FirstOrDefaultAsync(t => t.Id == userId)).IfNullThrowException(); if (_verifyConfig.CurrentValue.OpenUserComplexPassword) { @@ -74,7 +83,7 @@ namespace IRaCIS.Core.Application.Service } - var dbUser = (await _userRepository.Where(t => t.Id == userId).FirstOrDefaultAsync()).IfNullThrowException(); + var dbUser = (await _identityUserRepository.Where(t => t.Id == identityUserId).FirstOrDefaultAsync()).IfNullThrowException(); if (oldPwd != null && dbUser.Password != oldPwd) { @@ -88,7 +97,7 @@ namespace IRaCIS.Core.Application.Service throw new BusinessValidationFailedException(_localizer["User_NewOldPwdSame"]); } - var passWordList = await _userPassWordLogRepository.Where(x => x.UserId == userId).OrderByDescending(x => x.CreateTime).Take(2).ToListAsync(); + var passWordList = await _userPassWordLogRepository.Where(x => x.IdentityUserId == identityUserId).OrderByDescending(x => x.CreateTime).Take(2).ToListAsync(); if (passWordList.Any(x => x.PassWord == newPwd)) { @@ -99,7 +108,7 @@ namespace IRaCIS.Core.Application.Service if (oldPwd == null) { - oldPwd = await _userRepository.Where(x => x.Id == userId).Select(x => x.Password).FirstOrDefaultAsync(); + oldPwd = await _identityUserRepository.Where(x => x.Id == identityUserId).Select(x => x.Password).FirstOrDefaultAsync(); } if (oldPwd.IsNotNullOrEmpty()) @@ -109,11 +118,11 @@ namespace IRaCIS.Core.Application.Service CreateTime = DateTime.Now, PassWord = oldPwd!, - UserId = userId, + IdentityUserId = identityUserId, }); } - await _userRepository.BatchUpdateNoTrackingAsync(x => x.Id == userId, x => new User() + await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == identityUserId, x => new IdentityUser() { LastChangePassWordTime = DateTime.Now, }); @@ -142,7 +151,7 @@ namespace IRaCIS.Core.Application.Service //验证码 6位 int verificationCode = new Random().Next(100000, 1000000); - await _mailVerificationService.SendMailEditEmail(_userInfo.Id, _userInfo.RealName, email, verificationCode); + await _mailVerificationService.SendMailEditEmail(_userInfo.IdentityUserId, _userInfo.FullName, email, verificationCode); return ResponseOutput.Ok(); @@ -156,7 +165,7 @@ namespace IRaCIS.Core.Application.Service var verificationRecord = await _verificationCodeRepository - .FirstOrDefaultAsync(t => t.UserId == _userInfo.Id && t.Code == verificationCode && t.CodeType == 0); + .FirstOrDefaultAsync(t => t.UserId == _userInfo.UserRoleId && t.Code == verificationCode && t.CodeType == 0); //检查数据库是否存在该验证码 if (verificationRecord == null) @@ -184,18 +193,19 @@ namespace IRaCIS.Core.Application.Service { - await VerifyUserEmailAsync(_userInfo.Id, _userInfo.UserTypeId, newEmail); + await VerifyUserEmailAsync(_userInfo.IdentityUserId, newEmail); - await _userRepository.UpdatePartialFromQueryAsync(_userInfo.Id, u => new User() + await _identityUserRepository.UpdatePartialFromQueryAsync(_userInfo.IdentityUserId, u => new IdentityUser() { EMail = newEmail }); //删除验证码历史记录 - await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.UserId == _userInfo.Id && t.CodeType == 0); + await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.UserId == _userInfo.UserRoleId && t.CodeType == 0); + + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = _userInfo.IdentityUserId, OptType = UserOptType.UpdateUser }, true); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true); return ResponseOutput.Ok(); @@ -208,14 +218,15 @@ namespace IRaCIS.Core.Application.Service public async Task SetNewPhone(string newPhone) { - await VerifyUserPhoneAsync(_userInfo.Id, _userInfo.UserTypeId, newPhone); + await VerifyUserPhoneAsync(_userInfo.IdentityUserId, newPhone); - await _userRepository.UpdatePartialFromQueryAsync(_userInfo.Id, u => new User() + await _identityUserRepository.UpdatePartialFromQueryAsync(_userInfo.IdentityUserId, u => new IdentityUser() { Phone = newPhone }); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = _userInfo.IdentityUserId, OptType = UserOptType.UpdateUser }, true); + return ResponseOutput.Ok(); } @@ -224,15 +235,16 @@ namespace IRaCIS.Core.Application.Service [HttpPut("{newUserName}")] public async Task SetNewUserName(string newUserName) { - await VerifyUserNameAsync(_userInfo.Id, newUserName); + await VerifyUserNameAsync(_userInfo.IdentityUserId, newUserName); - await _userRepository.UpdatePartialFromQueryAsync(_userInfo.Id, u => new User() + await _identityUserRepository.UpdatePartialFromQueryAsync(_userInfo.IdentityUserId, u => new IdentityUser() { UserName = newUserName }); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = _userInfo.IdentityUserId, OptType = UserOptType.UpdateUser }, true); + return ResponseOutput.Ok(); } @@ -240,15 +252,15 @@ namespace IRaCIS.Core.Application.Service [HttpGet] - public async Task InitSetUserNameAndPwd(Guid userId, string newUserName, string newPWd) + public async Task InitSetUserNameAndPwd(string newUserName, string newPWd) { - await VerifyUserPwdAsync(userId, newPWd); + await VerifyUserPwdAsync(_userInfo.IdentityUserId, newPWd); - await VerifyUserNameAsync(userId, newUserName); + await VerifyUserNameAsync(_userInfo.IdentityUserId, newUserName); - await _userRepository.UpdatePartialFromQueryAsync(userId, u => new User() + await _identityUserRepository.UpdatePartialFromQueryAsync(_userInfo.IdentityUserId, u => new IdentityUser() { UserName = newUserName, @@ -260,7 +272,7 @@ namespace IRaCIS.Core.Application.Service }, true); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = _userInfo.IdentityUserId, OptType = UserOptType.UpdateUser }, true); return ResponseOutput.Ok(); } @@ -269,29 +281,29 @@ namespace IRaCIS.Core.Application.Service /// /// 重置密码为 默认密码 /// - /// + /// /// - [HttpGet("{userId:guid}")] + [HttpGet("{identityUserId:guid}")] [UnitOfWork] - public async Task ResetPassword(Guid userId) + public async Task ResetPassword(Guid identityUserId) { var pwd = IRCEmailPasswordHelper.GenerateRandomPassword(10); - await _mailVerificationService.AdminResetPwdSendEmailAsync(userId, pwd); + await _mailVerificationService.AdminResetPwdSendEmailAsync(identityUserId, pwd); - await _userRepository.UpdatePartialFromQueryAsync(userId, u => new User() + await _identityUserRepository.UpdatePartialFromQueryAsync(t => t.Id == identityUserId, u => new IdentityUser() { Password = MD5Helper.Md5(pwd), IsFirstAdd = true }); - var userName = _userRepository.Where(t => t.Id == userId).Select(t => t.UserName).FirstOrDefault(); + var userName = _identityUserRepository.Where(t => t.Id == identityUserId).Select(t => t.UserName).FirstOrDefault(); await _fusionCache.RemoveAsync(CacheKeys.UserLoginError(userName)); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = userId, OptType = UserOptType.ResetPassword }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = identityUserId, OptType = UserOptType.ResetPassword }, true); return ResponseOutput.Ok(); } @@ -318,7 +330,7 @@ namespace IRaCIS.Core.Application.Service } ////查找改邮箱或者手机的用户 - var exist = await _userRepository.AnyAsync(t => t.EMail == email); + var exist = await _identityUserRepository.AnyAsync(t => t.EMail == email && t.Status == UserStateEnum.Enable); if (!exist) { @@ -346,7 +358,7 @@ namespace IRaCIS.Core.Application.Service /// [AllowAnonymous] [HttpGet("{email}/{verifyCode}")] - public async Task> VerifyAnonymousVerifyCode(string email, string verifyCode) + public async Task VerifyAnonymousVerifyCode(string email, string verifyCode) { var verificationRecord = await _verificationCodeRepository .Where(t => t.UserId == Guid.Empty && t.Code == verifyCode && t.CodeType == VerifyType.Email && t.EmailOrPhone == email).OrderByDescending(t => t.CreateTime).FirstOrDefaultAsync(); @@ -375,37 +387,36 @@ namespace IRaCIS.Core.Application.Service } } - var list = await _userRepository.Where(t => t.EMail == email && t.Status == UserStateEnum.Enable).Select(t => new UserAccountDto() { UserId = t.Id, UserName = t.UserName, UserRealName = t.FullName, UserType = t.UserTypeRole.UserTypeShortName }).ToListAsync(); + var userInfo = await _identityUserRepository.Where(t => t.EMail == email && t.Status == UserStateEnum.Enable).Select(t => new UserAccountDto() { Id = t.Id, UserName = t.UserName, UserRealName = t.FullName }).FirstOrDefaultAsync(); - - - return list; + return userInfo; } /// /// (未登陆) 设置新密码 /// - /// + /// /// /// [AllowAnonymous] - [HttpGet("{userId:guid}/{newPwd}")] - public async Task AnonymousSetPassword(Guid userId, string newPwd) + [HttpGet("{identityUserId:guid}/{newPwd}")] + public async Task AnonymousSetPassword(Guid identityUserId, string newPwd) { - await VerifyUserPwdAsync(userId, newPwd); + await VerifyUserPwdAsync(identityUserId, newPwd); - var success = await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() + await _identityUserRepository.UpdatePartialFromQueryAsync(t => t.Id == identityUserId, u => new IdentityUser() { Password = newPwd, IsFirstAdd = false }); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = userId, LoginPassword = newPwd, OptType = UserOptType.UnloginModifyPasswoed }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = identityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = identityUserId, OptType = UserOptType.UnloginModifyPasswoed }, true); - return ResponseOutput.Result(success); + + return ResponseOutput.Ok(); } @@ -418,28 +429,28 @@ namespace IRaCIS.Core.Application.Service public async Task ModifyPassword(EditPasswordCommand editPwModel) { - await VerifyUserPwdAsync(_userInfo.Id, editPwModel.NewPassWord, editPwModel.OldPassWord); + await VerifyUserPwdAsync(_userInfo.IdentityUserId, editPwModel.NewPassWord, editPwModel.OldPassWord); if (!string.IsNullOrEmpty(editPwModel.NewUserName)) { - await VerifyUserNameAsync(_userInfo.Id, editPwModel.NewUserName); + await VerifyUserNameAsync(_userInfo.IdentityUserId, editPwModel.NewUserName); - await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new User() + await _identityUserRepository.UpdatePartialFromQueryAsync(t => t.Id == _userInfo.IdentityUserId, u => new IdentityUser() { UserName = editPwModel.NewUserName, }); } - var success = await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new User() + var success = await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.IdentityUserId, u => new IdentityUser() { Password = editPwModel.NewPassWord, IsFirstAdd = false }); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.LoginModifyPassword }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = _userInfo.IdentityUserId, OptType = UserOptType.LoginModifyPassword }, true); return ResponseOutput.Result(success); @@ -457,21 +468,24 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task> GetUserList(UserListQueryDTO inQuery) { - var userQueryable = _userRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.RealName), t => t.FullName.Contains(inQuery.RealName)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.Phone), t => t.Phone.Contains(inQuery.Phone)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.OrganizationName.Contains(inQuery.OrganizationName)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.EMail), t => t.EMail.Contains(inQuery.EMail)) - .WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime) - .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime) - .WhereIf(inQuery.BeginLastLoginTime != null, t => t.LastLoginTime >= inQuery.BeginLastLoginTime) - .WhereIf(inQuery.EndLastLoginTime != null, t => t.LastLoginTime <= inQuery.EndLastLoginTime) - .WhereIf(inQuery.UserType != null, t => t.UserTypeId == inQuery.UserType) - .WhereIf(inQuery.UserState != null, t => t.Status == inQuery.UserState) - .WhereIf(inQuery.IsTestUser != null, t => t.IsTestUser == inQuery.IsTestUser) - .WhereIf(inQuery.IsZhiZhun != null, t => t.IsZhiZhun == inQuery.IsZhiZhun) - .ProjectTo(_mapper.ConfigurationProvider); + + var userQueryable = _identityUserRepository.Where(x => x.UserRoleList.Any(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.RealName), t => t.FullName.Contains(inQuery.RealName)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.Phone), t => t.Phone.Contains(inQuery.Phone)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.OrganizationName.Contains(inQuery.OrganizationName)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.EMail), t => t.EMail.Contains(inQuery.EMail)) + .WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime) + .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime) + .WhereIf(inQuery.BeginLastLoginTime != null, t => t.LastLoginTime >= inQuery.BeginLastLoginTime) + .WhereIf(inQuery.EndLastLoginTime != null, t => t.LastLoginTime <= inQuery.EndLastLoginTime) + .WhereIf(inQuery.BeginLastChangePassWordTime != null, t => t.LastChangePassWordTime >= inQuery.BeginLastChangePassWordTime) + .WhereIf(inQuery.EndLastChangePassWordTime != null, t => t.LastChangePassWordTime <= inQuery.EndLastChangePassWordTime) + .WhereIf(inQuery.UserType != null, t => t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserType)) + .WhereIf(inQuery.UserState != null, t => t.Status == inQuery.UserState) + .WhereIf(inQuery.IsTestUser != null, t => t.IsTestUser == inQuery.IsTestUser) + .WhereIf(inQuery.IsZhiZhun != null, t => t.IsZhiZhun == inQuery.IsZhiZhun) + .ProjectTo(_mapper.ConfigurationProvider); return await userQueryable.ToPagedListAsync(inQuery); @@ -480,15 +494,26 @@ namespace IRaCIS.Core.Application.Service /// /// 根据用户Id获取用户详细信息[New] /// - /// /// xiuga - [HttpGet("{id:guid}")] - public async Task GetUser(Guid id) + + public async Task GetUser(Guid identityUserId) { - var userQuery = _userRepository.Where(t => t.Id == id).ProjectTo(_mapper.ConfigurationProvider); - return await (userQuery.FirstOrDefaultAsync()).IfNullThrowException(); + + identityUserId = identityUserId != Guid.Empty ? identityUserId : _userInfo.IdentityUserId; + + var user = await _identityUserRepository.Where(t => t.Id == identityUserId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + + if (user != null) + { + user.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + + } + return user; } + + + /// /// 添加用户 /// @@ -501,20 +526,22 @@ namespace IRaCIS.Core.Application.Service await VerifyUserNameAsync(null, userAddModel.UserName); - await VerifyUserEmailAsync(null, userAddModel.UserTypeId, userAddModel.EMail); + await VerifyUserEmailAsync(null, userAddModel.EMail); //await VerifyUserPhoneAsync(null, userAddModel.UserTypeId, userAddModel.Phone); - var saveItem = _mapper.Map(userAddModel); + var saveItem = _mapper.Map(userAddModel); + + var @lock = _distributedLockProvider.CreateLock($"UserAccount"); using (await @lock.AcquireAsync()) { - saveItem.Code = await _userRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1; + saveItem.Code = await _identityUserRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1; - saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User)); + saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(IdentityUser)); if (saveItem.IsZhiZhun) { @@ -526,19 +553,43 @@ namespace IRaCIS.Core.Application.Service saveItem.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10)); - await _userRepository.AddAsync(saveItem); + var addRoleList = new List(); - var success = await _userRepository.SaveChangesAsync(); + foreach (var role in userAddModel.UserRoleList) + { + var addRole = _mapper.Map(userAddModel); + + addRole.UserTypeEnum = role.UserTypeEnum; + addRole.UserTypeId = role.UserTypeId; + addRole.IsUserRoleDisabled = role.IsUserRoleDisabled; + + addRoleList.Add(addRole); + } + + saveItem.UserRoleList = addRoleList; + + await _identityUserRepository.AddAsync(saveItem); + + var success = await _identityUserRepository.SaveChangesAsync(); } await _mailVerificationService.AddUserSendEmailAsync(saveItem.Id, userAddModel.BaseUrl, userAddModel.RouteUrl); + return ResponseOutput.Ok(new UserAddedReturnDTO { Id = saveItem.Id, UserCode = saveItem.UserCode }); } + [HttpPost] + public async Task AddNewUserSendEmail(NewUserSendEmailCommand incommand) + { + await _mailVerificationService.AddUserSendEmailAsync(incommand.IdentityUserId, incommand.BaseUrl, incommand.RouteUrl); + + return ResponseOutput.Ok(); + } + /// /// 更新用户 /// @@ -548,19 +599,24 @@ namespace IRaCIS.Core.Application.Service { + await VerifyUserNameAsync(model.Id, model.UserName); - await VerifyUserEmailAsync(model.Id, model.UserTypeId, model.EMail); + await VerifyUserEmailAsync(model.Id, model.EMail); //await VerifyUserPhoneAsync(model.Id, model.UserTypeId, model.Phone); - var user = await _userRepository.FirstOrDefaultAsync(t => t.Id == model.Id); + var user = await _identityUserRepository.Where(t => t.Id == model.Id, true).Include(t => t.UserRoleList).FirstOrDefaultAsync(); if (user == null) return Null404NotFound(user); - if (user.Status!=model.Status) + + if (user.Status != model.Status) { - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = model.Status == UserStateEnum.Enable ? UserOptType.AccountEnable : UserOptType.AccountLocked }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = model.Id, OptType = model.Status == UserStateEnum.Enable ? UserOptType.AccountEnable : UserOptType.AccountLocked }, true); + + + await _fusionCache.SetAsync(CacheKeys.UserDisable(user.Id), model.Status == UserStateEnum.Disable, TimeSpan.FromHours(1)); } @@ -572,61 +628,122 @@ namespace IRaCIS.Core.Application.Service user.OrganizationName = _userInfo.IsEn_Us ? _systemEmailConfig.OrganizationName : _systemEmailConfig.OrganizationNameCN; } - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = UserOptType.UpdateUser }); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.UserRoleId, OptUserId = model.Id, OptType = UserOptType.UpdateUser }); - + //处理角色的添加、禁用 + + foreach (var role in model.UserRoleList) + { + var find = user.UserRoleList.FirstOrDefault(t => t.UserTypeEnum == role.UserTypeEnum && t.UserTypeId == role.UserTypeId); + + if (find != null) + { + find.IsUserRoleDisabled = role.IsUserRoleDisabled; + + await _fusionCache.SetAsync(CacheKeys.UserRoleDisable(find.Id), find.IsUserRoleDisabled, TimeSpan.FromHours(1)); + } + else + { + var addRole = _mapper.Map(model); + + addRole.Id = NewId.NextSequentialGuid(); + addRole.IdentityUserId = user.Id; + addRole.UserTypeEnum = role.UserTypeEnum; + addRole.UserTypeId = role.UserTypeId; + + user.UserRoleList.Add(addRole); + } + } + + + var success = await _userRoleRepository.SaveChangesAsync(); + + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = model.Id, OptType = UserOptType.UpdateUser }, true); - var success = await _userRepository.SaveChangesAsync(); return ResponseOutput.Ok(success); } - /// - /// 删除用户 - /// - /// - /// - [HttpDelete("{userId:guid}")] - public async Task DeleteUser(Guid userId) + + [HttpPut] + public async Task UpdateUserBasicInfo(UserBasicInfoCommand command) { - if (await _userTrialRepository.AnyAsync(t => t.Id == userId)) + + var user = await _identityUserRepository.Where(t => t.Id == command.Id, true).FirstOrDefaultAsync(); + + if (user == null) return Null404NotFound(user); + _mapper.Map(command, user); + + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = command.Id, OptType = UserOptType.UpdateUser }, true); + + await _identityUserRepository.SaveChangesAsync(); + return ResponseOutput.Ok(); + } + + [HttpPut] + public async Task UpdateUserRoleInfo(UpdateUserRolesDto command) + { + var user = await _identityUserRepository.Where(t => t.Id == command.Id, true).Include(t => t.UserRoleList).FirstOrDefaultAsync(); + + if (user == null) return Null404NotFound(user); + + foreach (var role in command.UserRoleList) { - //---该用户已经参加项目,不能够删除。 - return ResponseOutput.NotOk(_localizer["User_InProject"]); + var find = user.UserRoleList.FirstOrDefault(t => t.UserTypeEnum == role.UserTypeEnum && t.UserTypeId == role.UserTypeId); + + if (find != null) + { + find.IsUserRoleDisabled = role.IsUserRoleDisabled; + + + await _fusionCache.SetAsync(CacheKeys.UserRoleDisable(find.Id), find.IsUserRoleDisabled, TimeSpan.FromHours(1)); + } + else + { + var addRole = _mapper.Map(user); + + addRole.Id = NewId.NextSequentialGuid(); + addRole.IdentityUserId = user.Id; + addRole.UserTypeEnum = role.UserTypeEnum; + addRole.UserTypeId = role.UserTypeId; + addRole.IsUserRoleDisabled = role.IsUserRoleDisabled; + + user.UserRoleList.Add(addRole); + } } - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = userId, OptType = UserOptType.DeleteUser }, true); - var success = await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == userId); + var success = await _userRoleRepository.SaveChangesAsync(); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = command.Id, OptType = UserOptType.UpdateUserRole }, true); - return ResponseOutput.Result(success); + return ResponseOutput.Ok(); } - /// - /// 禁用或者启用账户 - /// - /// - /// - /// + ///// + ///// 禁用或者启用账户 + ///// + ///// + ///// + ///// - [HttpPost("{userId:guid}/{state:int}")] - public async Task UpdateUserState(Guid userId, UserStateEnum state) - { + //[HttpPost("{userId:guid}/{state:int}")] + //public async Task UpdateUserState(Guid userId, UserStateEnum state) + //{ - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = userId, OptType = state == UserStateEnum.Enable ? UserOptType.AccountEnable : UserOptType.AccountLocked }, true); + // await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = userId, OptType = state == UserStateEnum.Enable ? UserOptType.AccountEnable : UserOptType.AccountLocked }, true); - var success = await _userRepository.BatchUpdateNoTrackingAsync(u => u.Id == userId, t => new User - { - Status = state - }); - return ResponseOutput.Result(success); - } + // var success = await _identityUserRepository.BatchUpdateNoTrackingAsync(u => u.IdentityUserId == userId, t => new User + // { + // Status = state + // }); + // return ResponseOutput.Result(success); + //} public async Task GetUserBasicInfo(Guid userId, string pwd) { - var info = await _userRepository.Where(u => u.Id == userId && u.Password == pwd).ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); + var info = await _identityUserRepository.Where(u => u.Id == userId && u.Password == pwd).ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); return info; } @@ -634,17 +751,16 @@ namespace IRaCIS.Core.Application.Service /// /// 发送MFA 验证邮件 /// - /// - /// + /// - [AllowAnonymous] - public async Task SendMFAEmail(Guid userId, int mfaType) + public async Task SendMFAEmail(SendMfaCommand sendMfa) { - var userInfo = await _userRepository.Where(u => u.Id == userId).Select(t => new { t.FullName, t.EMail }).FirstOrDefaultAsync(); + var identityUserId = sendMfa.IdentityUserId == Guid.Empty ? _userInfo.IdentityUserId : sendMfa.IdentityUserId; + var userInfo = await _identityUserRepository.Where(u => u.Id == identityUserId).Select(t => new { t.FullName, t.EMail }).FirstOrDefaultAsync(); int verificationCode = new Random().Next(100000, 1000000); - await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, (UserMFAType)mfaType); + await _mailVerificationService.SenMFAVerifyEmail(identityUserId, userInfo.FullName, userInfo.EMail, verificationCode, sendMfa.MFAType); var hiddenEmail = IRCEmailPasswordHelper.MaskEmail(userInfo.EMail); return ResponseOutput.Ok(hiddenEmail); @@ -653,20 +769,19 @@ namespace IRaCIS.Core.Application.Service /// /// 验证MFA 邮件 /// - /// /// /// /// - [AllowAnonymous] - public async Task VerifyMFACodeAsync(Guid userId, string Code) + public async Task VerifyMFACodeAsync(string Code) { - var verificationRecord = await _verificationCodeRepository.Where(t => t.UserId == userId && t.Code == Code && t.CodeType == VerifyType.Email).OrderByDescending(x => x.ExpirationTime).FirstOrDefaultAsync(); + var identityUserId = _userInfo.IdentityUserId; + + var verificationRecord = await _verificationCodeRepository.Where(t => t.UserId == identityUserId && t.Code == Code && t.CodeType == VerifyType.Email).OrderByDescending(x => x.ExpirationTime).FirstOrDefaultAsync(); VerifyEmialGetDoctorInfoOutDto result = new VerifyEmialGetDoctorInfoOutDto(); //检查数据库是否存在该验证码 if (verificationRecord == null) { - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = userId, OptType = UserOptType.MFALoginFail }, true); //---验证码错误。 throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_WrongVerificationCode"]); } @@ -675,19 +790,14 @@ namespace IRaCIS.Core.Application.Service //检查验证码是否失效 if (verificationRecord.ExpirationTime < DateTime.Now) { - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = userId, OptType = UserOptType.MFALoginFail }, true); //---验证码已经过期。 throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_ExpiredVerificationCode"]); - - } else //验证码正确 并且 没有超时 { - - //删除验证码历史记录 await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.Id == verificationRecord.Id); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = userId, OptType = UserOptType.MFALogin }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionUserName = _userInfo.UserName, TargetIdentityUserId = identityUserId, OptType = UserOptType.MFALogin }, true); } } @@ -725,7 +835,7 @@ namespace IRaCIS.Core.Application.Service if (failCount >= maxFailures) { - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = Guid.Empty, OptUserId = Guid.Empty, LoginFaildName = userName, LoginPassword = password, OptType = UserOptType.AccountLocked }, true); + //await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = Guid.Empty, OptUserId = Guid.Empty, LoginFaildName = userName, LoginPassword = password, OptType = UserOptType.AccountLocked }, true); //$"密码连续错误{maxFailures}次,当前账号已被限制登录,请等待 {lockoutMinutes} 分钟后再试。" throw new BusinessValidationFailedException(_localizer["User_ErrorLimit", maxFailures, lockoutMinutes]); @@ -734,7 +844,7 @@ namespace IRaCIS.Core.Application.Service var userLoginReturnModel = new LoginReturnDTO(); - var loginUser = await _userRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + var loginUser = await _userRoleRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); if (loginUser == null) { @@ -743,9 +853,9 @@ namespace IRaCIS.Core.Application.Service failCount++; await _fusionCache.SetAsync(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes)); - var errorPwdUserId = await _userRepository.Where(u => u.UserName == userName).Select(t => t.Id).FirstOrDefaultAsync(); + var errorPwdUserId = await _identityUserRepository.Where(u => u.UserName == userName).Select(t => t.Id).FirstOrDefaultAsync(); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = errorPwdUserId, OptUserId = errorPwdUserId, LoginFaildName = userName, LoginPassword = password, OptType = UserOptType.AccountOrPasswordError }, true); + //await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = errorPwdUserId, OptUserId = errorPwdUserId, LoginFaildName = userName, LoginPassword = password, OptType = UserOptType.AccountOrPasswordError }, true); return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO()); @@ -753,7 +863,7 @@ namespace IRaCIS.Core.Application.Service if (loginUser.Status == 0) { - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = loginUser.Id, OptUserId = loginUser.Id, LoginFaildName = userName, OptType = UserOptType.LoginLockedAccount }, true); + //await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = loginUser.IdentityUserId, OptUserId = loginUser.IdentityUserId, LoginFaildName = userName, OptType = UserOptType.LoginLockedAccount }, true); //---该用户已经被禁用。 return ResponseOutput.NotOk(_localizer["User_Disabled"], new LoginReturnDTO()); @@ -777,16 +887,17 @@ namespace IRaCIS.Core.Application.Service //超过90天没修改密码 if (_verifyConfig.CurrentValue.IsNeedChangePassWord && loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value) { - loginUser.LoginState = 1; + loginUser.NeedChangePassWord = true; + } - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = loginUser.Id, OptUserId = loginUser.Id, OptType = UserOptType.Login }, true); + //await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = loginUser.IdentityUserId, OptUserId = loginUser.IdentityUserId, OptType = UserOptType.Login }, true); userLoginReturnModel.BasicInfo = loginUser; if (loginUser.LastChangePassWordTime == null) { - await _userRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.Id, x => new User() + await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.IdentityUserId, x => new IdentityUser() { LastChangePassWordTime = DateTime.Now @@ -794,7 +905,7 @@ namespace IRaCIS.Core.Application.Service } - await _userRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.Id, x => new User() + await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.IdentityUserId, x => new IdentityUser() { LastLoginIP = iPRegion, LastLoginTime = DateTime.Now @@ -812,17 +923,18 @@ namespace IRaCIS.Core.Application.Service var userLogQueryable = _userLogRepository.AsQueryable().IgnoreQueryFilters() - .WhereIf(inQuery.TrialId != null, t => t.LoginUser.UserTrials.Any(c => c.TrialId == inQuery.TrialId && (c.UserId == t.LoginUserId || c.UserId == t.OptUserId))) + .WhereIf(inQuery.IdentityUserId != null, t => t.ActionIdentityUserId == inQuery.IdentityUserId) + .WhereIf(inQuery.TrialId != null, t => t.ActionIdentityUser.UserTrialList.Any(c => c.TrialId == inQuery.TrialId)) .WhereIf(trialCreateTime != null, t => t.CreateTime >= trialCreateTime) .WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType) - .WhereIf(inQuery.UserId != null, t => t.LoginUserId == inQuery.UserId) .WhereIf(inQuery.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate) .WhereIf(inQuery.EndDate != null, t => t.CreateTime <= inQuery.EndDate) - .WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.LoginUser.UserName.Contains(inQuery.LoginUserName!)) - .WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.LoginFaildName.Contains(inQuery.LoginFaildName!)) + .WhereIf(inQuery.IsLoginUncommonly != null, t => t.IsLoginUncommonly == inQuery.IsLoginUncommonly) + .WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.ActionUserName.Contains(inQuery.LoginUserName!)) + .WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.ActionUserName.Contains(inQuery.LoginFaildName!)) .WhereIf(!string.IsNullOrEmpty(inQuery.IP), t => t.IP.Contains(inQuery.IP!)) - .WhereIf(inQuery.LoginUserTypeEnum != null, t => t.LoginUser.UserTypeEnum == inQuery.LoginUserTypeEnum) - .WhereIf(inQuery.UserTypeId != null, t => t.LoginUser.UserTypeId == inQuery.UserTypeId) + .WhereIf(inQuery.LoginUserTypeEnum != null, t => t.CreateUserRole.UserTypeEnum == inQuery.LoginUserTypeEnum) + .WhereIf(inQuery.UserTypeId != null, t => t.CreateUserRole.UserTypeId == inQuery.UserTypeId) .ProjectTo(_mapper.ConfigurationProvider); @@ -833,13 +945,270 @@ namespace IRaCIS.Core.Application.Service [AllowAnonymous] [HttpGet] - public async Task LoginOut(Guid userId) + public async Task LoginOut(Guid identityUserId, Guid userRoleId) { - await _fusionCache.RemoveAsync(CacheKeys.UserToken(_userInfo.Id)); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = _userInfo.Id, OptType = UserOptType.LoginOut }, true); + await _fusionCache.RemoveAsync(CacheKeys.UserToken(identityUserId)); + + var userName = await _userRoleRepository.Where(t => t.Id == userRoleId).Select(t => t.IdentityUser.UserName).FirstOrDefaultAsync(); + + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = identityUserId, ActionUserName = userName, OptType = UserOptType.LoginOut }, true); return ResponseOutput.Ok(); } + + #region 多账号修改 + + /// + /// 账号验证,获取账号角色信息 获取临时token + /// + /// + /// + [AllowAnonymous] + [HttpPost] + public async Task> GetUserLoginRoleList(IRCLoginDto loginDto, + [FromServices] ITokenService _tokenService, + [FromServices] IOptionsMonitor _emailConfig + ) + { + + var userName = loginDto.UserName; + var password = loginDto.Password; + + var emailConfig = _emailConfig.CurrentValue; + var companyInfo = new SystemEmailSendConfigView() { CompanyName = emailConfig.CompanyName, CompanyNameCN = emailConfig.CompanyNameCN, CompanyShortName = emailConfig.CompanyShortName, CompanyShortNameCN = emailConfig.CompanyShortNameCN }; + + + int maxFailures = _verifyConfig.CurrentValue.LoginMaxFailCount; + int lockoutMinutes = _verifyConfig.CurrentValue.LoginFailLockMinutes; + + // 生成缓存键 + string cacheKey = CacheKeys.UserLoginError(userName); + + // 从缓存中获取登录失败次数 + int? failCount = await _fusionCache.GetOrDefaultAsync(cacheKey); + + if (failCount == null) + { + failCount = 0; + } + + //每次登录 都重置缓存时间 + await _fusionCache.SetAsync(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes)); + + + var userLog = new UserLog(); + + if (failCount >= maxFailures) + { + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionUserName = userName, LoginPassword = password, OptType = UserOptType.TempLockLogin }, true); + + //$"密码连续错误{maxFailures}次,当前账号已被限制登录,请等待 {lockoutMinutes} 分钟后再试。" + throw new BusinessValidationFailedException(_localizer["User_ErrorLimit", maxFailures, lockoutMinutes]); + } + + var userLoginReturnModel = new IRCLoginReturnDTO(); + + + var loginUser = await _identityUserRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + + var existUserLoginInfo = await _identityUserRepository.Where(u => u.UserName == userName).Select(t => new { t.LastLoginIP, t.LastChangePassWordTime, t.Id }).FirstOrDefaultAsync(); + + var isExistAccount = existUserLoginInfo != null; + + var isLoginUncommonly = false; + + #region //登录用户是系统用户的时候,就要要记录异地登录 + + //账号在系统存在 + if (isExistAccount || loginUser != null) + { + var ipinfo = _searcher.Search(_userInfo.IP); + + var iPRegion = string.Join('|', ipinfo.Split('|').TakeLast(3)); + + string SplitAndConcatenate(string input) + { + string[] parts = input.Split('|'); + return parts.Length >= 3 ? parts[0] + parts[1] : string.Join("", parts); + } + + if (existUserLoginInfo.LastLoginIP != string.Empty) + { + // 与上一次区域不一致 + if (SplitAndConcatenate(existUserLoginInfo.LastLoginIP) != SplitAndConcatenate(iPRegion)) + { + + isLoginUncommonly = true; + + //设置上次登录的IP + await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == existUserLoginInfo.Id, x => new IdentityUser() + { + LastLoginIP = iPRegion, + LastLoginTime = DateTime.Now + + }); + + if (loginUser != null) + { + //异地登录 + loginUser.LoginState = 2; + + //超过90天没修改密码 + if (_verifyConfig.CurrentValue.IsNeedChangePassWord && loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value) + { + loginUser.NeedChangePassWord = true; + } + } + } + } + + } + + #endregion + + + if (loginUser == null) + { + + //错误次数累加 + failCount++; + + await _fusionCache.SetAsync(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes)); + + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionUserName = userName, LoginPassword = password, OptType = UserOptType.AccountOrPasswordError, IsLoginUncommonly = isLoginUncommonly }, true); + + return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new IRCLoginReturnDTO()); + + } + + + + + + if (loginUser.Status == 0) + { + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = userName, OptType = UserOptType.LoginLockedAccount, IsLoginUncommonly = isLoginUncommonly }, true); + + //---该用户已经被禁用。 + return ResponseOutput.NotOk(_localizer["User_Disabled"], new IRCLoginReturnDTO()); + } + + //登录成功 清除缓存 + await _fusionCache.SetAsync(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes)); + + + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, OptType = UserOptType.Login, IsLoginUncommonly = isLoginUncommonly }, true); + + userLoginReturnModel.BasicInfo = loginUser; + + if (loginUser.LastChangePassWordTime == null) + { + await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.IdentityUserId, x => new IdentityUser() + { + LastChangePassWordTime = DateTime.Now + + }); + + } + + + + //返回临时token + userLoginReturnModel.JWTStr = _tokenService.GetToken(new UserTokenInfo() { IdentityUserId = loginUser.IdentityUserId, UserName = userName }); + + + var identityUserId = loginUser.IdentityUserId; + + + if (_verifyConfig.CurrentValue.OpenLoginMFA) + { + + //MFA 发送邮件 + + userLoginReturnModel.IsMFA = true; + + var email = userLoginReturnModel.BasicInfo.EMail; + + var hiddenEmail = IRCEmailPasswordHelper.MaskEmail(email); + + userLoginReturnModel.BasicInfo.EMail = hiddenEmail; + + //修改密码 || 90天修改密码再mfa 之前 + if (userLoginReturnModel.BasicInfo.IsFirstAdd || userLoginReturnModel.BasicInfo.NeedChangePassWord) + { + //userLoginReturnModel.JWTStr = _tokenService.GetToken(userLoginReturnModel.BasicInfo); + } + else + { + //正常登录才发送邮件 + await SendMFAEmail(new SendMfaCommand() { IdentityUserId = identityUserId, MFAType = UserMFAType.Login }); + + } + + } + else + { + + await _fusionCache.SetAsync(CacheKeys.UserToken(identityUserId), userLoginReturnModel.JWTStr, TimeSpan.FromDays(7)); + + await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(identityUserId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(_verifyConfig.CurrentValue.AutoLoginOutMinutes)); + } + + userLoginReturnModel.BasicInfo.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + userLoginReturnModel.CompanyInfo = companyInfo; + + return ResponseOutput.Ok(userLoginReturnModel); + + } + + /// + /// 验证密码成功后,选定角色,然后获取当前角色的Token + /// + /// + /// + /// + /// + [HttpGet] + public async Task LoginSelectUserRole(Guid userRoleId, [FromServices] ITokenService _tokenService, [FromServices] IReadingImageTaskService readingImageTaskService) + { + var identityUserId = _userInfo.IdentityUserId; + + var userTokenInfo = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId && t.Id == userRoleId).Select(t => new UserTokenInfo() + { + UserRoleId = t.Id, + IdentityUserId = t.IdentityUserId, + UserTypeEnum = t.UserTypeEnum, + UserTypeId = t.UserTypeId, + IsTestUser = t.IdentityUser.IsTestUser, + IsZhiZhun = t.IdentityUser.IsZhiZhun, + FullName = t.IdentityUser.FullName, + PermissionStr = t.UserTypeRole.PermissionStr, + UserName = t.IdentityUser.UserName, + UserTypeShortName = t.UserTypeRole.UserTypeShortName, + }).FirstOrDefaultAsync(); + + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = userTokenInfo.IdentityUserId, ActionUserName = $"{userTokenInfo.UserName}", ActionUserType = userTokenInfo.UserTypeShortName, OptType = UserOptType.LoginSelectRole }, true); + + if (userTokenInfo != null) + { + var jwt = _tokenService.GetToken(userTokenInfo); + + // 验证阅片休息时间 + await readingImageTaskService.ResetReadingRestTime(userTokenInfo.UserRoleId); + + await _fusionCache.SetAsync(CacheKeys.UserToken(userTokenInfo.IdentityUserId), jwt, TimeSpan.FromDays(7)); + + return jwt; + } + else + { + throw new BusinessValidationFailedException("传递参数查询数据库不存在!"); + } + } + + + + #endregion } } diff --git a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs index 924343023..e1a7fffae 100644 --- a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs @@ -12,7 +12,7 @@ namespace IRaCIS.Core.Application.Contracts /// UserTypeRoleService /// [ApiExplorerSettings(GroupName = "Management")] - public class UserTypeRoleService(IRepository _userTypeRepository, IRepository _userRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IUserTypeService + public class UserTypeRoleService(IRepository _userTypeRepository, IRepository _userRoleRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IUserTypeService { [HttpPost] @@ -79,7 +79,7 @@ namespace IRaCIS.Core.Application.Contracts [HttpDelete("{userTypeId:guid}")] public async Task DeleteUserTypeRole(Guid userTypeId) { - if (await _userRepository.AnyAsync(t => t.UserTypeId == userTypeId)) + if (await _userRoleRepository.AnyAsync(t => t.UserTypeId == userTypeId)) { //---该用户类型中已存在用户,不能删除 return ResponseOutput.NotOk(_localizer["UserType_InUse"]); diff --git a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs index bd6289e3f..1beb2f36c 100644 --- a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs @@ -1,6 +1,8 @@ using AutoMapper; using AutoMapper.EquivalencyExpression; +using DocumentFormat.OpenXml.Spreadsheet; using IRaCIS.Application.Contracts; +using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Application.ViewModel; @@ -16,7 +18,10 @@ namespace IRaCIS.Core.Application.Service - CreateMap().ForMember(d => d.UserCode, x => x.Ignore()); + CreateMap() + .ForMember(d => d.UserCode, x => x.Ignore()) + .ForMember(d => d.UserRoleList, x => x.Ignore()); + CreateMap().ReverseMap() .ForMember(t => t.UserTypeMenuList, u => u.MapFrom(c => c.MenuIds)) .ForMember(t => t.UserTypeGroupList, u => u.MapFrom(c => c.UserTypeGroupIdList)); @@ -73,24 +78,26 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.UserType, u => u.MapFrom(t => t.UserTypeName)); - CreateMap() - .ForMember(d => d.RealName, u => u.MapFrom(s => s.FullName)) - .ForMember(d => d.UserTypeId, u => u.MapFrom(s => s.UserTypeRole.Id)) - .ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeName)) - .ForMember(d => d.UserTypeShortName, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName)) - .ForMember(d => d.CanEditUserType, u => u.MapFrom(s => !s.UserTrials.Any())); + // CreateMap() + //.ForMember(d => d.RealName, u => u.MapFrom(s => s.FullName)) + //.ForMember(d => d.UserTypeId, u => u.MapFrom(s => s.UserTypeRole.Id)) + //.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeName)) + //.ForMember(d => d.UserTypeShortName, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName)) + //.ForMember(d => d.CanEditUserType, u => u.MapFrom(s => !s.UserTrials.Any())); - CreateMap() - .ForMember(d => d.RealName, u => u.MapFrom(s => s.FullName)) - .ForMember(d => d.UserTypeId, u => u.MapFrom(s => s.UserTypeRole.Id)) - .ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName)) - .ForMember(d => d.CanEditUserType, u => u.MapFrom(s => !s.UserTrials.Any())); + // CreateMap() + // .ForMember(d => d.RealName, u => u.MapFrom(s => s.FullName)) + // .ForMember(d => d.UserTypeId, u => u.MapFrom(s => s.UserTypeRole.Id)) + // .ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName)) + // .ForMember(d => d.CanEditUserType, u => u.MapFrom(s => !s.UserTrials.Any())); + + CreateMap(); var token = string.Empty; var userId = Guid.Empty; CreateMap() .ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.UserName)) - .ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUser.UserName)) + .ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUserRole.IdentityUser.UserName)) .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token)); @@ -98,7 +105,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.UserName)) - .ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUser.UserName)) + .ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUserRole.IdentityUser.UserName)) .ForMember(t => t.IsRead, d => d.MapFrom(t => t.NoticeUserReadList.Any(t => t.CreateUserId == userId))) .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token)); @@ -116,11 +123,8 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(d => d.LoginUserName, c => c.MapFrom(t => t.LoginUser.UserName)) - .ForMember(d => d.LoginUserTypeEnum, c => c.MapFrom(t => t.LoginUser.UserTypeEnum)) - .ForMember(d => d.OptUserName, c => c.MapFrom(t => t.OptUser.UserName)) - .ForMember(d => d.OptUserTypeEnum, c => c.MapFrom(t => t.OptUser.UserTypeEnum)) - ; + //.ForMember(d => d.ActionUserRoleShortName, c => c.MapFrom(t => t.CreateUserRole.UserTypeRole.UserTypeShortName)) + .ForMember(d => d.TargetIdentityUserName, c => c.MapFrom(t => t.TargetIdentityUser.UserName)); CreateMap() @@ -129,13 +133,48 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.SubjectCode, c => c.MapFrom(t => t.Subject.Code)) .ForMember(d => d.TrialSiteCode, c => c.MapFrom(t => t.VisitTask.IsAnalysisCreate ? t.VisitTask.BlindTrialSiteCode : t.TrialSite.TrialSiteCode)) .ForMember(d => d.SubjectVisitName, c => c.MapFrom(t => t.SubjectVisit.VisitName)) - .ForMember(d => d.FeedBackUserName, c => c.MapFrom(t => t.CreateUser.UserName)) - .ForMember(d => d.FeedBackFullName, c => c.MapFrom(t => t.CreateUser.FullName)) - .ForMember(d => d.UserTypeEnum, c => c.MapFrom(t => t.CreateUser.UserTypeEnum)) + .ForMember(d => d.FeedBackUserName, c => c.MapFrom(t => t.CreateUserRole.IdentityUser.UserName)) + .ForMember(d => d.FeedBackFullName, c => c.MapFrom(t => t.CreateUserRole.IdentityUser.FullName)) + .ForMember(d => d.UserTypeEnum, c => c.MapFrom(t => t.CreateUserRole.UserTypeEnum)) .ForMember(d => d.ScreenshotList, c => c.MapFrom(t => t.FeedBackScreenshotList)) ; CreateMap().ReverseMap(); + + CreateMap(); + + CreateMap() + .ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName)); + + + + CreateMap(); + + CreateMap() + .ForMember(d => d.IdentityUserId, c => c.MapFrom(t => t.Id)); + CreateMap(); + + CreateMap().ReverseMap(); + + + CreateMap() + .ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName)); + + CreateMap(); + + CreateMap().ReverseMap(); + + CreateMap(); + + + CreateMap(); + + CreateMap(); + + + + + } } diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 418c6f4d6..bbe11f7b9 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -158,6 +158,9 @@ namespace IRaCIS.Core.Application.Contracts public bool IsPacsConnectConfiged { get; set; } + [Comment("阅片任务产生之前 采集影像")] + public CollectImagesType CollectImagesEnum { get; set; } + } @@ -179,23 +182,31 @@ namespace IRaCIS.Core.Application.Contracts [DictionaryTranslateAttribute("IsSystemDoc")] public bool IsSystemDoc { get; set; } - [DictionaryTranslateAttribute("YesOrNo")] + [DictionaryTranslateAttribute("TrainingStatus")] public bool IsDeleted { get; set; } //上传时间 public DateTime CreateTime { get; set; } - [DictionaryTranslateAttribute("YesOrNo")] + [DictionaryTranslateAttribute("TrainingStatusEnum")] public bool IsConfirmed => ConfirmTime != null; public string RealName { get; set; } public string UserName { get; set; } - public string UserTypeShortName { get; set; } - + public Guid ConfirmUserId { get; set; } public DateTime? ConfirmTime { get; set; } + + + public string UserTypes => string.Join(',', UserConfirmedUserTypeList); + + public List UserConfirmedUserTypeList => (DocNeedSignUserTypeList != null && IdentityUserTypeList != null) ? IdentityUserTypeList.Intersect(DocNeedSignUserTypeList).ToList() : new List(); + + + public IEnumerable IdentityUserTypeList { get; set; } + public IEnumerable DocNeedSignUserTypeList { get; set; } } public class CRCVisitExportDTO @@ -299,18 +310,20 @@ namespace IRaCIS.Core.Application.Contracts public string LatestReplyUserName { get; set; } = String.Empty; public string Content { get; set; } = string.Empty; - public string ContentReplaced { + public string ContentReplaced + { - get { - - var msg= Content.Replace("
", "").Replace("
", ""); + get + { + + var msg = Content.Replace("
", "").Replace("
", ""); string[] substrings = msg.Split(new string[] { "
", "
" }, StringSplitOptions.None); return string.Join("\n\n", substrings); } - - } + + } [DictionaryTranslateAttribute("ChallengeIsClosed")] public bool IsClosed { get; set; } @@ -1155,16 +1168,31 @@ namespace IRaCIS.Core.Application.Contracts public string TranslateDicName { get; set; } } + public class ExportQuestionBasicInfo + { + public QuestionType? QuestionType { get; set; } + public string TableName { get; set; } + public Guid QuestionId { get; set; } + public string QuestionName { get; set; } + public string TranslateDicName { get; set; } + public string CDISCCode { get; set; } + } + public class CommonQuesionInfo { - + //问题标识,肿瘤评估用于区分是什么问题 public QuestionType? QuestionType { get; set; } + + + public Guid QuestionId { get; set; } public string QuestionName { get; set; } public string QuestionValue { get; set; } public string TranslateDicName { get; set; } + + public string CDISCCode { get; set; } } public class CommonEvaluationExport { @@ -1212,15 +1240,29 @@ namespace IRaCIS.Core.Application.Contracts public string JudgeNote { get; set; } = string.Empty; public string VisitNote { get; set; } + + #region CDISC_阅片结果表 + + public string ResearchProgramNo { get; set; } = string.Empty; + + public string VisitName { get; set; } + + + public string TrialSiteSubjectCode => ResearchProgramNo + SubjectCode; + + //最晚拍片日期 + public DateTime? LatestScanDate { get; set; } + + public string LatestScanDateStr => LatestScanDate?.ToString("yyyy-MM-dd"); + + //阅片完成时间 + public DateTime? SignTime { get; set; } + + #endregion } public class CommonLessionExport : CommonEvaluationExport { - /// - /// 最终导出的病灶信息 - /// - public List LessionAnswerList { get; set; } - [JsonIgnore] public List LesionList { get; set; } = new List(); @@ -1240,18 +1282,34 @@ namespace IRaCIS.Core.Application.Contracts public class CommonLessionQuestionAnswerInfo { - public string LessionCode { get; set; } - - public string LessionType { get; set; } - + #region 肿瘤评估标准的时候需要 public QuestionMark? QuestionMark { get; set; } + #endregion + + + #region CDISC导出 + + public string CDISCCode { get; set; } + + #endregion + + + #region 自定义表格名 特殊处理 + + public string TableName { get; set; } + #endregion + + + public Guid TableQuesionId { get; set; } + public string QuestionName { get; set; } public string QuestionValue { get; set; } public string TranslateDicName { get; set; } + } @@ -1717,6 +1775,8 @@ namespace IRaCIS.Core.Application.Contracts public Guid CreateUserId { get; set; } + public string CreateUserFullName { get; set; } = String.Empty; + public string CreateUserName { get; set; } = String.Empty; //public bool NeedReUpload { get; set; } diff --git a/IRaCIS.Core.Application/Service/QC/Interface/IQCListService.cs b/IRaCIS.Core.Application/Service/QC/Interface/IQCListService.cs index df26d3ea1..b9240b3b6 100644 --- a/IRaCIS.Core.Application/Service/QC/Interface/IQCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/Interface/IQCListService.cs @@ -25,7 +25,7 @@ namespace IRaCIS.Core.Application.Image.QA Task> GetQCQuestionAnswerList(Guid subjectVisitId, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType); Task> GetSubjectVisitSelectList(Guid subjectId); - Task<(List, object)> GetSubjectVisitUploadedStudyList(Guid subjectVisitId); + Task>> GetSubjectVisitUploadedStudyList(Guid subjectVisitId); Task GetUploadInitInfo(Guid subjectVisitId); Task GetVisitQCInfo(Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType); Task GetVisitQCStudyAndSeriesList(Guid subjectVisitId); diff --git a/IRaCIS.Core.Application/Service/QC/QCCommon.cs b/IRaCIS.Core.Application/Service/QC/QCCommon.cs index da3590c1e..012befc5e 100644 --- a/IRaCIS.Core.Application/Service/QC/QCCommon.cs +++ b/IRaCIS.Core.Application/Service/QC/QCCommon.cs @@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Service { subjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException(); } - if (subjectVisit!.CurrentActionUserId != _userInfo.Id) + if (subjectVisit!.CurrentActionUserId != _userInfo.UserRoleId) { //---您不是该质控任务当前领取人,没有操作权限! throw new BusinessValidationFailedException(_localizer["QCCommon_NoPermission"]); diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index 7953faaca..f5f99cd48 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -17,7 +17,7 @@ namespace IRaCIS.Core.Application.Image.QA IRepository _trialQCQuestionAnswerRepository, IRepository _trialQCQuestionRepository, IRepository _dicomStudyRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _dicomSeriesRepository, IRepository _noneDicomStudyRepository, IRepository _qcChallengeRepository, @@ -52,7 +52,7 @@ namespace IRaCIS.Core.Application.Image.QA .WhereIf(inQuery.SubmitState != null, t => t.SubmitState == inQuery.SubmitState) .WhereIf(inQuery.ChallengeState != null, t => t.ChallengeState == inQuery.ChallengeState) .WhereIf(inQuery.IsUrgent != null, t => t.IsUrgent == inQuery.IsUrgent) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .ProjectTo(_mapper.ConfigurationProvider); @@ -148,7 +148,7 @@ namespace IRaCIS.Core.Application.Image.QA .WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == true, t => t.IsClosed ? t.ClosedTime > t.DeadlineTime : DateTime.Now > t.DeadlineTime) .WhereIf(inQuery.IsOverTime != null && inQuery.IsOverTime == false, t => t.IsClosed ? t.ClosedTime < t.DeadlineTime : DateTime.Now < t.DeadlineTime) .WhereIf(inQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == inQuery.IsUrgent) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.SubjectVisit.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .ProjectTo(_mapper.ConfigurationProvider); var pageList = await query.ToPagedListAsync(inQuery, new string[] { nameof(QCCRCChallengeViewModel.IsUrgent) + " desc", nameof(QCCRCChallengeViewModel.CreateTime) }); @@ -209,7 +209,7 @@ namespace IRaCIS.Core.Application.Image.QA var result = await GetQCVisitList(new QCVisitSearchDTO() { TrialId = inDto.TrialId, - CurrentActionUserId = _userInfo.Id, + CurrentActionUserId = _userInfo.UserRoleId, VisitId = inDto.VisitId, PageIndex = 1, PageSize = 1, @@ -291,7 +291,7 @@ namespace IRaCIS.Core.Application.Image.QA .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectInfo), t => t.Subject.Code.Contains(inQuery.SubjectInfo)) .WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression) //.WhereIf(!string.IsNullOrEmpty(checkQuery.VisitPlanInfo), checkQuery.VisitPlanInfo.Contains('.') ? t => t.InPlan == false : t => t.VisitNum == decimal.Parse(checkQuery.VisitPlanInfo)) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))//CRC 过滤负责的site .ProjectTo(_mapper.ConfigurationProvider); var pageList = await query.ToPagedListAsync(inQuery); @@ -313,7 +313,7 @@ namespace IRaCIS.Core.Application.Image.QA var sv = (await _subjectVisitRepository.Where(t => t.Id == subjectVisitId) .ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException(); - sv.DialogList.ForEach(t => t.IsCurrentUser = _userInfo.Id == t.CreateUserId); + sv.DialogList.ForEach(t => t.IsCurrentUser = _userInfo.UserRoleId == t.CreateUserId); return sv; } @@ -517,7 +517,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpGet("{subjectVisitId:guid}")] - public async Task<(List, object)> GetSubjectVisitUploadedStudyList(Guid subjectVisitId) + public async Task>> GetSubjectVisitUploadedStudyList(Guid subjectVisitId) { var visit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).FirstNotNullAsync(); @@ -530,7 +530,7 @@ namespace IRaCIS.Core.Application.Image.QA config.IsPacsConnectConfiged = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).AnyAsync(t => t.Trial.IsPACSConnect && t.Subject.TrialSite.TrialSiteDicomAEList.Any()); - return (list, config); + return ResponseOutput.Ok (list, config); } @@ -544,7 +544,7 @@ namespace IRaCIS.Core.Application.Image.QA { var list = await _qcChallengeRepository.Where(t => t.Id == qaChallengeId) - .ProjectTo(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.Id }).ToListAsync(); + .ProjectTo(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.UserRoleId }).ToListAsync(); //利用automapper 运行时映射 //list.ForEach(t => t.IsCurrentUser = _userInfo.Id == t.CreateUserId); @@ -566,7 +566,7 @@ namespace IRaCIS.Core.Application.Image.QA { var qaChallengeQuery = _qcChallengeRepository.Where(t => t.SubjectVisitId == subjectVisitId && t.QCProcessEnum == trialQCProcess) - .ProjectTo(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.Id }); + .ProjectTo(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.UserRoleId }); var list = await qaChallengeQuery.ToListAsync(); @@ -584,10 +584,10 @@ namespace IRaCIS.Core.Application.Image.QA public async Task> GetQCChallengeCreatorList(Guid trialId) { - return await _trialUserRepository.Where(t => t.TrialId == trialId && t.User.UserTypeEnum == UserTypeEnum.IQC).Select(t => new QCChanllengeCreatorDto() + return await _trialUserRoleRepository.Where(t => t.TrialId == trialId && t.UserRole.UserTypeEnum == UserTypeEnum.IQC).Select(t => new QCChanllengeCreatorDto() { - CreatorRealName = t.User.FullName, - Creator = t.User.UserName, + CreatorRealName = t.UserRole.FullName, + Creator = t.UserRole.IdentityUser.UserName, CreateUserId = t.UserId }).ToListAsync(); @@ -601,10 +601,10 @@ namespace IRaCIS.Core.Application.Image.QA [HttpGet("{trialId:guid}")] public async Task> GetQCParticipantList(Guid trialId) { - return await _trialUserRepository.Where(t => t.TrialId == trialId && (t.User.UserTypeEnum == UserTypeEnum.IQC || t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)).Select(t => new ParticipantDTO() + return await _trialUserRoleRepository.Where(t => t.TrialId == trialId && (t.UserRole.UserTypeEnum == UserTypeEnum.IQC || t.UserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)).Select(t => new ParticipantDTO() { - HandleUserRealName = t.User.FullName, - HandleUser = t.User.UserName, + HandleUserRealName = t.UserRole.FullName, + HandleUser = t.UserRole.IdentityUser.UserName, HandleUserId = t.UserId }).ToListAsync(); } diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 66a613276..37ddc5d59 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -29,7 +29,7 @@ namespace IRaCIS.Core.Application.Image.QA IRepository _visitTaskRepository, IRepository _scpPatientRepository, IRepository _scpStudyRepository, - IRepository _trialUserRepository, + IRepository _trialUserRoleRepository, IRepository _readModuleRepository, IRepository _dicomInstanceRepository, IRepository _trialQCQuestionAnswerRepository, @@ -224,7 +224,7 @@ namespace IRaCIS.Core.Application.Image.QA dbQCChallenge.LatestMsgTime = DateTime.Now; - dbQCChallenge.LatestReplyUserId = _userInfo.Id; + dbQCChallenge.LatestReplyUserId = _userInfo.UserRoleId; var success = await _qCChallengeDialogrepository.SaveChangesAsync(); @@ -345,7 +345,7 @@ namespace IRaCIS.Core.Application.Image.QA ResponseOutput.NotOk(_localizer["QCOperation_PassAfterClose"]); } - sv.CheckUserId = _userInfo.Id; + sv.CheckUserId = _userInfo.UserRoleId; sv.CheckState = CheckStateEnum.CVPassed; sv.ReadingStatus = ReadingStatusEnum.TaskAllocate; @@ -835,7 +835,7 @@ namespace IRaCIS.Core.Application.Image.QA subjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == sujectVisitId)).IfNullThrowException(); } - if (subjectVisit!.CurrentActionUserId != _userInfo.Id) + if (subjectVisit!.CurrentActionUserId != _userInfo.UserRoleId) { //---您不是该质控任务当前领取人,没有操作权限! throw new BusinessValidationFailedException(_localizer["QCOperation_NoRecipient"]); @@ -863,7 +863,7 @@ namespace IRaCIS.Core.Application.Image.QA dbSubjectVisit.IsTake = true; - dbSubjectVisit.CurrentActionUserId = _userInfo.Id; + dbSubjectVisit.CurrentActionUserId = _userInfo.UserRoleId; dbSubjectVisit.CurrentActionUserExpireTime = DateTime.Now.AddHours(1); @@ -919,8 +919,8 @@ namespace IRaCIS.Core.Application.Image.QA break; case TrialQCProcess.SingleAudit: visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted - && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId != _userInfo.Id && (x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) - .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id) + && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId != _userInfo.UserRoleId && (x.CurrentActionUserId == _userInfo.UserRoleId || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId) .Include(x => x.Subject).ToListAsync(); subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) @@ -953,9 +953,9 @@ namespace IRaCIS.Core.Application.Image.QA case TrialQCProcess.DoubleAudit: visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && - ((x.CurrentActionUserId == _userInfo.Id) || (!x.IsTake && x.AuditState != AuditStateEnum.QCPassed && (x.PreliminaryAuditUserId != _userInfo.Id))) + ((x.CurrentActionUserId == _userInfo.UserRoleId) || (!x.IsTake && x.AuditState != AuditStateEnum.QCPassed && (x.PreliminaryAuditUserId != _userInfo.UserRoleId))) ) - .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId) .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) { @@ -1046,7 +1046,7 @@ namespace IRaCIS.Core.Application.Image.QA } else if (trialConfig.QCProcessEnum == TrialQCProcess.SingleAudit) { - if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.Id) + if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.UserRoleId) { //---初审已通过,不能继续领取 return ResponseOutput.NotOk(_localizer["QCOperation_InitialAuditPassed"]); @@ -1068,7 +1068,7 @@ namespace IRaCIS.Core.Application.Image.QA } else if (trialConfig.QCProcessEnum == TrialQCProcess.DoubleAudit) { - if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.Id) + if (dbSubjectVisit.PreliminaryAuditUserId == _userInfo.UserRoleId) { //---复审不能和初审是同一个人 return ResponseOutput.NotOk(_localizer["QCOperation_NoSameReviewer"]); @@ -1099,7 +1099,7 @@ namespace IRaCIS.Core.Application.Image.QA dbSubjectVisit.IsTake = true; - dbSubjectVisit.CurrentActionUserId = _userInfo.Id; + dbSubjectVisit.CurrentActionUserId = _userInfo.UserRoleId; dbSubjectVisit.CurrentActionUserExpireTime = DateTime.Now.AddHours(1); @@ -1109,7 +1109,7 @@ namespace IRaCIS.Core.Application.Image.QA } else { - if (dbSubjectVisit!.CurrentActionUserId != _userInfo.Id) + if (dbSubjectVisit!.CurrentActionUserId != _userInfo.UserRoleId) { //---您不是该质控任务当前领取人,没有操作权限! return ResponseOutput.NotOk(_localizer["QCOperation_NoRecipient"], ApiResponseCodeEnum.NeedTips); @@ -1414,7 +1414,7 @@ namespace IRaCIS.Core.Application.Image.QA { dbSubjectVisit.SubmitState = SubmitStateEnum.Submitted; dbSubjectVisit.SubmitTime = DateTime.Now; - dbSubjectVisit.SubmitUserId = _userInfo.Id; + dbSubjectVisit.SubmitUserId = _userInfo.UserRoleId; //维护统一状态 dbSubjectVisit.ReadingStatus = ReadingStatusEnum.ImageQuality; @@ -1513,7 +1513,7 @@ namespace IRaCIS.Core.Application.Image.QA public async Task QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState) { - if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == _userInfo.Id)) + if (!await _trialUserRoleRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == _userInfo.UserRoleId)) { //---您已经被移出项目,没有操作权限。 return ResponseOutput.NotOk(_localizer["QCOperation_RemoveItem"]); @@ -1574,7 +1574,7 @@ namespace IRaCIS.Core.Application.Image.QA dbSubjectVisit.AuditState = AuditStateEnum.QCPassed; dbSubjectVisit.CheckState = trialConfig.IsImageConsistencyVerification ? CheckStateEnum.ToCheck : CheckStateEnum.CVPassed; dbSubjectVisit.ForwardState = trialConfig.IsImageConsistencyVerification ? ForwardStateEnum.None : ForwardStateEnum.ToForward; - dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id; + dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId; dbSubjectVisit.PreliminaryAuditTime = DateTime.Now; @@ -1618,7 +1618,7 @@ namespace IRaCIS.Core.Application.Image.QA } dbSubjectVisit.AuditState = AuditStateEnum.PrimaryQCPassed; - dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id; + dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId; dbSubjectVisit.PreliminaryAuditTime = DateTime.Now; @@ -1638,7 +1638,7 @@ namespace IRaCIS.Core.Application.Image.QA dbSubjectVisit.ForwardState = trialConfig.IsImageConsistencyVerification ? ForwardStateEnum.None : ForwardStateEnum.ToForward; - dbSubjectVisit.ReviewAuditUserId = _userInfo.Id; + dbSubjectVisit.ReviewAuditUserId = _userInfo.UserRoleId; dbSubjectVisit.ReviewAuditTime = DateTime.Now; @@ -1682,7 +1682,7 @@ namespace IRaCIS.Core.Application.Image.QA if (dbSubjectVisit.AuditState == AuditStateEnum.InPrimaryQC) { dbSubjectVisit.AuditState = AuditStateEnum.QCFailed; - dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id; + dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId; } else @@ -1697,12 +1697,12 @@ namespace IRaCIS.Core.Application.Image.QA if (dbSubjectVisit.AuditState == AuditStateEnum.InPrimaryQC) { dbSubjectVisit.AuditState = AuditStateEnum.QCFailed; - dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id; + dbSubjectVisit.PreliminaryAuditUserId = _userInfo.UserRoleId; } else if (dbSubjectVisit.AuditState == AuditStateEnum.InSecondaryQC) { dbSubjectVisit.AuditState = AuditStateEnum.QCFailed; - dbSubjectVisit.ReviewAuditUserId = _userInfo.Id; + dbSubjectVisit.ReviewAuditUserId = _userInfo.UserRoleId; } else { @@ -1717,7 +1717,7 @@ namespace IRaCIS.Core.Application.Image.QA } - dbSubjectVisit.Auditor = _userInfo.Id; + dbSubjectVisit.Auditor = _userInfo.UserRoleId; dbSubjectVisit.IsTake = false; dbSubjectVisit.CurrentActionUserId = null; dbSubjectVisit.CurrentActionUserExpireTime = null; @@ -1818,7 +1818,7 @@ namespace IRaCIS.Core.Application.Image.QA qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.QCAgreeUpload; qcChallenge.LatestMsgTime = DateTime.Now; - qcChallenge.LatestReplyUserId = _userInfo.Id; + qcChallenge.LatestReplyUserId = _userInfo.UserRoleId; await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == qcChallenge.SubjectVisitId, c => new SubjectVisit() { IsQCConfirmedReupload = true }); @@ -1845,7 +1845,7 @@ namespace IRaCIS.Core.Application.Image.QA sv.AuditState = AuditStateEnum.InPrimaryQC; sv.CurrentActionUserExpireTime = DateTime.Now.AddHours(1); - sv.CurrentActionUserId = _userInfo.Id; + sv.CurrentActionUserId = _userInfo.UserRoleId; //BackgroundJob.Schedule(t => t.CancelQCObtaion(qcChallenge.SubjectVisitId, DateTime.Now), TimeSpan.FromHours(1)); sv.IsTake = true; @@ -1936,13 +1936,13 @@ namespace IRaCIS.Core.Application.Image.QA qcChallenge.ReUploadedTime = DateTime.Now; - qcChallenge.ReUploadUserId = _userInfo.Id; + qcChallenge.ReUploadUserId = _userInfo.UserRoleId; - qcChallenge.ReUploader = _userInfo.RealName; + qcChallenge.ReUploader = _userInfo.FullName; qcChallenge.LatestMsgTime = DateTime.Now; - qcChallenge.LatestReplyUserId = _userInfo.Id; + qcChallenge.LatestReplyUserId = _userInfo.UserRoleId; var dbSubjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == qcChallenge.SubjectVisitId).IfNullThrowException(); @@ -2013,7 +2013,7 @@ namespace IRaCIS.Core.Application.Image.QA } qcChallenge.LatestMsgTime = DateTime.Now; - qcChallenge.LatestReplyUserId = _userInfo.Id; + qcChallenge.LatestReplyUserId = _userInfo.UserRoleId; qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.CRCRequestReupload; qcChallenge.DialogList.Add(new QCChallengeDialog() diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 146f770f2..1918ba859 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -28,7 +28,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.QCProcessEnum, u => u.MapFrom(s => s.Trial.QCProcessEnum)) .ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code)) .ForMember(d => d.SubjectStatus, u => u.MapFrom(s => s.Subject.Status)) - + .ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName)) .ForMember(d => d.ClinicalInformationTransmissionEnum, u => u.MapFrom(s => s.Trial.ClinicalInformationTransmissionEnum)) @@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime)) - .ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName)) + .ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.FullName)) .ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent)); CreateMap() @@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.SubjectVisit.TrialSite.TrialSiteCode)) .ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName)) - .ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName)) + .ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.UserName)) .ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName)) .ForMember(d => d.LatestReplyUserFullName, u => u.MapFrom(t => t.LatestReplyUser.FullName)) .ForMember(d => d.DialogList, u => u.MapFrom(t => t.DialogList)) @@ -89,8 +89,8 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.RadiologyClinicalDataCount, u => u.MapFrom(s => s.ClinicalDataList.Count(t => t.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead))) .ForMember(d => d.OncologyClinicalDataCount, u => u.MapFrom(s => s.ClinicalDataList.Count(t => t.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead))) - .ForMember(d => d.ChallengeWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.SelectMany(c => c.QCChallengeList).Count(t => t.IsClosed == false && !t.DialogList.Any(t => t.CreateUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)))) - .ForMember(d => d.CheckWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.CheckState == CheckStateEnum.CVIng && t.CheckChallengeState != CheckChanllengeTypeEnum.Closed && !t.CheckChallengeDialogList.Any(t => t.CreateUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)))) + .ForMember(d => d.ChallengeWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.SelectMany(c => c.QCChallengeList).Count(t => t.IsClosed == false && !t.DialogList.Any(t => t.CreateUserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)))) + .ForMember(d => d.CheckWaitReplyCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.CheckState == CheckStateEnum.CVIng && t.CheckChallengeState != CheckChanllengeTypeEnum.Closed && !t.CheckChallengeDialogList.Any(t => t.CreateUserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)))) ; CreateMap() @@ -124,7 +124,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime)) - .ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName)) + .ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUserRole.FullName)) .ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent)); CreateMap() @@ -145,9 +145,9 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindSubjectCode : u.Subject.Code)) - .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) - .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.FullName)) .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName)) .ForMember(o => o.SubjectStatus, t => t.MapFrom(u => u.Subject.Status)); @@ -161,9 +161,9 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindSubjectCode : u.Subject.Code)) - .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) - .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.IdentityUser.FullName)) .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName)) .ForMember(o => o.SubjectStatus, t => t.MapFrom(u => u.Subject.Status)); @@ -242,7 +242,9 @@ namespace IRaCIS.Core.Application.Service QuestionType = c.ReadingQuestionTrial.QuestionType, QuestionName = isEn_Us ? c.ReadingQuestionTrial.QuestionEnName : c.ReadingQuestionTrial.QuestionName, QuestionValue = c.IsGlobalChange ? c.GlobalChangeAnswer : c.Answer, - TranslateDicName = c.ReadingQuestionTrial.DictionaryCode + QuestionId = c.ReadingQuestionTrial.Id, + TranslateDicName = c.ReadingQuestionTrial.DictionaryCode, + CDISCCode = c.ReadingQuestionTrial.CDISCCode }))) ; @@ -255,15 +257,19 @@ namespace IRaCIS.Core.Application.Service (arbitrationRule == ArbitrationRule.Reading ? u.Subject.SubjectVisitTaskList.Any(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Judge && t.TrialReadingCriterionId == trialReadingCriterionId && u.VisitTaskNum < t.VisitTaskNum) : false))) - .ForMember(o => o.JudgeNote, t => t.MapFrom(u => u.ReadingCategory==ReadingCategory.Judge? u.JudgeResultRemark : u.JudgeVisitTask.JudgeResultRemark)) + .ForMember(o => o.JudgeNote, t => t.MapFrom(u => u.ReadingCategory == ReadingCategory.Judge ? u.JudgeResultRemark : u.JudgeVisitTask.JudgeResultRemark)) .ForMember(o => o.VisitNote, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.AdjustReason).FirstOrDefault()!.Answer)) //.ForMember(o => o.IsSubjectHaveReadingPeriod, t => t.MapFrom(u => arbitrationRule == ArbitrationRule.Reading ? //u.Subject.ReadModuleList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.ReadingSetType == ReadingSetType.ImageReading) : false)) - - .ForMember(o => o.SubjectCriterionReadingPeriodVisitNumList, t => t.MapFrom(u => - u.Subject.ReadModuleList.Where(t=>t.TrialReadingCriterionId == trialReadingCriterionId && t.ReadingSetType == ReadingSetType.ImageReading).Select(c=>c.SubjectVisit.VisitNum))) + + .ForMember(o => o.SubjectCriterionReadingPeriodVisitNumList, t => t.MapFrom(u => + u.Subject.ReadModuleList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.ReadingSetType == ReadingSetType.ImageReading).Select(c => c.SubjectVisit.VisitNum))) + + .ForMember(o => o.ResearchProgramNo, t => t.MapFrom(u => u.Trial.ResearchProgramNo)) + .ForMember(o => o.VisitName, t => t.MapFrom(u => u.SourceSubjectVisit.VisitName)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode)) + .ForMember(o => o.LatestScanDate, t => t.MapFrom(u => u.SourceSubjectVisit.LatestScanDate)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)) .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) .ForMember(o => o.QuestionAnswerList, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList @@ -272,14 +278,17 @@ namespace IRaCIS.Core.Application.Service .Select(c => new CommonQuesionInfo() { QuestionType = c.ReadingQuestionTrial.QuestionType, + QuestionId = c.ReadingQuestionTrial.Id, QuestionName = isEn_Us ? c.ReadingQuestionTrial.QuestionEnName : c.ReadingQuestionTrial.QuestionName, - QuestionValue = c.IsGlobalChange?c.GlobalChangeAnswer: c.Answer, - TranslateDicName = c.ReadingQuestionTrial.DictionaryCode + QuestionValue = c.IsGlobalChange ? c.GlobalChangeAnswer : c.Answer, + TranslateDicName = c.ReadingQuestionTrial.DictionaryCode, + CDISCCode = c.ReadingQuestionTrial.CDISCCode }))) ; - CreateMap().IncludeBase() - .ForMember(o => o.LesionList, t => t.MapFrom(u => u.LesionList)); + CreateMap() + .IncludeBase() + .ForMember(o => o.LesionList, t => t.MapFrom(u => u.LesionList/*.Where(c => c.ReadingQuestionTrial.ExportResultStr.Contains(((int)readingExportType).ToString()))*/ )); CreateMap() .ForMember(o => o.LessionCode, t => t.MapFrom(u => u.RowMark)) @@ -287,11 +296,14 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.LessionAnswerList, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.ExportResultStr.Contains(((int)readingExportType).ToString())))); CreateMap() - .ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark)) - .ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType)) + //.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark)) + //.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType)) .ForMember(o => o.QuestionMark, t => t.MapFrom(u => u.ReadingTableQuestionTrial.QuestionMark)) + .ForMember(o => o.TableQuesionId, t => t.MapFrom(u => u.ReadingTableQuestionTrial.Id)) .ForMember(o => o.QuestionName, t => t.MapFrom(u => isEn_Us ? u.ReadingTableQuestionTrial.QuestionEnName : u.ReadingTableQuestionTrial.QuestionName)) .ForMember(o => o.QuestionValue, t => t.MapFrom(u => u.Answer)) + .ForMember(o => o.CDISCCode, t => t.MapFrom(u => u.ReadingTableQuestionTrial.CDISCCode)) + .ForMember(o => o.TableName, t => t.MapFrom(u => isEn_Us ? u.ReadingQuestionTrial.QuestionEnName : u.ReadingQuestionTrial.QuestionName)) .ForMember(o => o.TranslateDicName, t => t.MapFrom(u => u.ReadingTableQuestionTrial.DictionaryCode)) ; @@ -554,8 +566,8 @@ namespace IRaCIS.Core.Application.Service //一致性核查 质疑对话 CreateMap() - .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName)) - .ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUser.FullName)); + .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.IdentityUser.UserName)) + .ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUserRole.IdentityUser.FullName)); CreateMap() .ForMember(d => d.SubjectVisitCheck, u => u.MapFrom(t => t)) @@ -586,13 +598,13 @@ namespace IRaCIS.Core.Application.Service // 临床数据上传 路径拼接返回 CreateMap() - .ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUser.FullName)) + .ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.FullName)) .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path)); CreateMap() - .ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUser.FullName)) + .ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.FullName)) .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path)); CreateMap() - .ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUser.FullName)) + .ForMember(d => d.CreateUser, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.FullName)) .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path)); @@ -602,14 +614,14 @@ namespace IRaCIS.Core.Application.Service //QC 质疑对话 var currentUserId = Guid.Empty; CreateMap() - .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName)) - .ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUser.FullName)) + .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.IdentityUser.UserName)) + .ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUserRole.FullName)) .ForMember(d => d.IsCurrentUser, u => u.MapFrom(s => s.CreateUserId == currentUserId)); //质疑编号 CreateMap() .ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName)) - .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName)) + .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.FullName)) .ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId)) .ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName)) @@ -624,7 +636,8 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName)) - .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName)) + .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.UserName)) + .ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUserRole.FullName)) .ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId)) .ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName)) @@ -641,7 +654,7 @@ namespace IRaCIS.Core.Application.Service // 一致性核查文件 CreateMap() - .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName)); + .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUserRole.FullName)); //CRC 质疑列表 @@ -666,10 +679,11 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName)) //.ForMember(d => d.ClosedUserUserName, u => u.MapFrom(s => s.ClosedUser.UserName)) .ForMember(d => d.IsQCConfirmedReupload, u => u.MapFrom(s => s.SubjectVisit.IsQCConfirmedReupload)) - .ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName)) + .ForMember(d => d.CreateUserFullName, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.FullName)) + .ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.UserName)) .ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName)) .ForMember(d => d.LatestReplyUserFullName, u => u.MapFrom(t => t.LatestReplyUser.FullName)) - + .ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode)); //排序的时候有坑 把这个带到sql 中去了 //.AfterMap((src, dest) => dest.ChallengeCode = "Q" + src.ChallengeCode.ToString("D5"));//实测没有效果 @@ -707,7 +721,7 @@ namespace IRaCIS.Core.Application.Service Guid? visiTaskId = null; CreateMap() .ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ? - s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).Where(t => !t.FileType.Contains(StaticData.FileType.Zip)).OrderBy(t => t.CreateTime).ThenBy(t=>t.FileName) + s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).Where(t => !t.FileType.Contains(StaticData.FileType.Zip)).OrderBy(t => t.CreateTime).ThenBy(t => t.FileName) : s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).OrderBy(t => t.CreateTime).ThenBy(t => t.FileName))) .ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode)); diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs index 00e20b823..96578b54e 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs @@ -394,6 +394,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public class TableRowInfo { + public Guid RowId { get; set; } + public decimal RowIndex { get; set; } public decimal FristAddTaskNum { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index e165d3563..c1dfd44dc 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -446,6 +446,78 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto } + public class DeleteSingleTableQuestionMarkInDto + { + [NotDefault] + public Guid Id { get; set; } + } + + public class DeleteTableQuestionMarkInDto + { + [NotDefault] + public Guid RowId { get; set; } + } + + /// + /// 保存表格问题标记 + /// + public class SaveTableQuestionMarkInDto + { + public string Answer { get; set; } + + public Guid VisitTaskId { get; set; } + + public Guid QuestionId { get; set; } + + public Guid? InstanceId { get; set; } + + public Guid? SeriesId { get; set; } + public Guid? StudyId { get; set; } + + public string MarkTool { get; set; } = string.Empty; + + public string PicturePath { get; set; } = string.Empty; + + public int? NumberOfFrames { get; set; } + + public string MeasureData { get; set; } = string.Empty; + public Guid? FristAddTaskId { get; set; } + + public QuestionType? QuestionType { get; set; } + public string OrderMarkName { get; set; } = string.Empty; + + public Guid? OtherInstanceId { get; set; } + + public Guid? OtherSeriesId { get; set; } + + public Guid? OtherStudyId { get; set; } + + public Guid? RowId { get; set; } + [NotDefault] + public Guid TableQuestionId { get; set; } + [NotDefault] + public decimal RowIndex { get; set; } + + public string OtherMarkTool { get; set; } = string.Empty; + + public string OtherPicturePath { get; set; } = string.Empty; + + public int? OtherNumberOfFrames { get; set; } + + public string OtherMeasureData { get; set; } = string.Empty; + } + + + public class TableQuestionMark: SaveTableQuestionMarkInDto + { + public Guid? Id { get; set; } + + public new Guid? TableQuestionId { get; set; } + + public new decimal? RowIndex { get; set; } + } + + public class GetPreviousOtherPicturePathInDto { @@ -991,6 +1063,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto { public Guid Id { get; set; } + public Guid? TableQuestionId { get; set; } + /// /// 序号标记 /// @@ -1134,7 +1208,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public class QuestionMarkInfo { - + public Guid? Id { get; set; } /// /// 问题Id @@ -1177,7 +1251,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string? MeasureData { get; set; } - public Guid? FirstAddTaskId { get; set; } + public Guid? FristAddTaskId { get; set; } public QuestionType? QuestionType { get; set; } @@ -2765,10 +2839,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto } - - [Comment("导出标识")] - public ExportIdentification? ExportIdentification { get; set; } - [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 5e2a335d7..d6b881d70 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -465,6 +465,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public QuestionMark? QuestionMark { get; set; } + /// + /// 默认值 + /// + public string DefaultValue { get; set; } = string.Empty; + /// /// 问题英文名称 /// @@ -475,8 +480,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public List ParentTriggerValueList { get; set; } = new List(); public List RelevanceValueList { get; set; } = new List(); - [Comment("导出标识")] - public ExportIdentification? ExportIdentification { get; set; } [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; @@ -603,14 +606,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public QuestionMark? QuestionMark { get; set; } + /// + /// 默认值 + /// + public string DefaultValue { get; set; } = string.Empty; + /// /// 问题英文名称 /// public string QuestionEnName { get; set; } = string.Empty; - [Comment("导出标识")] - public ExportIdentification? ExportIdentification { get; set; } - [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; @@ -750,6 +755,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto [NotDefault] public Guid TrialId { get; set; } + /// + /// 标准分组 + /// + public CriterionGroup CriterionGroup { get; set; } + /// /// 描述 /// @@ -795,6 +805,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto { public Guid? Id { get; set; } + /// + /// 标准分组 + /// + public CriterionGroup CriterionGroup { get; set; } + /// /// eCRF报告是否显示在图像页面 /// @@ -844,6 +859,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public class ReadingQuestionCriterionSystemViewInDto : PageInput { public string CriterionName { get; set; } = String.Empty; + + public bool? IsCompleteConfig { get; set; } + public bool? IsEnable { get; set; } + public CriterionGroup? CriterionGroup { get; set; } + public CriterionType? CriterionType { get; set; } + + } public class CriterionList @@ -899,11 +921,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid Id { get; set; } - /// - /// 导出标识 - /// - public ExportIdentification? ExportIdentification { get; set; } - [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; @@ -1205,13 +1222,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public class ReadingQuestionSystemView { - - /// - /// 导出标识 - /// - [Comment("导出标识")] - public ExportIdentification? ExportIdentification { get; set; } - /// /// 分类问题类型 /// @@ -1735,6 +1745,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto [Comment("问题标识")] public QuestionMark? QuestionMark { get; set; } + /// + /// 默认值 + /// + public string DefaultValue { get; set; } = string.Empty; + [Comment("字典code")] public string DictionaryCode { get; set; } = string.Empty; [Comment("数值类型")] @@ -1783,9 +1798,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto [Comment("分类算法")] public string ClassifyAlgorithms { get; set; } = string.Empty; - [Comment("导出标识")] - public ExportIdentification? ExportIdentification { get; set; } - [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; @@ -1822,6 +1834,91 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto } + public class SetTrialQuestionExportResultInDto + { + + public ExportType ExportType { get; set; } + + public List QuestionList = new List(); + + public List TableQuestionList = new List(); + } + + + public class SetTrialQuestionExport + { + public Guid QuestionId { get; set; } + + public Guid? TableQuestionId { get; set; } + + /// + /// 导出的CDISCName + /// + public string CDISCCode { get; set; } = string.Empty; + + public List ExportResult { get; set; } + } + + public class GetTrialQuestionExportResultInDto + { + [NotDefault] + public Guid TrialReadingCriterionId { get; set; } + + public ExportType ExportType { get; set; } + } + + public enum ExportType + { + Basic=0, + + CDISC=1, + } + + + public class GetTrialQuestionExportResultOutDto + { + public CriterionType CriterionType { get; set; } + public CriterionGroup CriterionGroup { get; set; } + + public List QuestionList = new List(); + + public List DicList = new List(); + } + + public class TrialQuestionExport + { + public Guid Id { get; set; } = Guid.NewGuid(); + public Guid QuestionId { get; set; } + + public Guid? TableQuestionId { get; set; } + + public string QuestionName { get; set; } + + public List ExportResult { get; set; } + + /// + /// 导出的CDISCName + /// + public string CDISCCode { get; set; } = string.Empty; + + public int ShowOrder { get; set; } + + public bool IsTableQuestion { get; set; } + + public bool HasChildren => Children.Count() > 0; + + public List Children { get; set; } = new List(); + } + + public class TrialQuestionExportDic + { + public int Code { get; set; } + + public string Value { get; set; } + + public string ValueCN { get; set; } + } + public class GetCustomQuestionPreviewInDto { [NotDefault] @@ -2006,11 +2103,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public ClassifyShowType? ClassifyShowType { get; set; } - /// - /// 导出标识 - /// - public ExportIdentification? ExportIdentification { get; set; } - /// /// 导出结果 /// @@ -2262,11 +2354,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public ClassifyShowType? ClassifyShowType { get; set; } - /// - /// 导出标识 - /// - public ExportIdentification? ExportIdentification { get; set; } - [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; @@ -2542,6 +2629,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public Guid Id { get; set; } + /// + /// 标准分组 + /// + public CriterionGroup CriterionGroup { get; set; } + /// /// 标准ID /// @@ -2593,6 +2685,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public Guid Id { get; set; } + /// + /// 标准分组 + /// + public CriterionGroup CriterionGroup { get; set; } + /// /// 系统标准ID /// diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs index b57a309bb..cec81c79f 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs @@ -77,7 +77,7 @@ namespace IRaCIS.Core.Application.Service medicalReviewInfo.ArmEnum = taskInfo.ArmEnum; medicalReviewInfo.SubjectCode = taskInfo.IsAnalysisCreate ? taskInfo.BlindSubjectCode : taskInfo.Subject.Code; medicalReviewInfo.TaskBlindName = taskInfo.TaskBlindName; - medicalReviewInfo.ReadingUser = taskInfo.DoctorUser.FirstName + taskInfo.DoctorUser.LastName; + medicalReviewInfo.ReadingUser = taskInfo.DoctorUser.FullName; medicalReviewInfo.SubjectId = taskInfo.SubjectId; medicalReviewInfo.IsClosedDialog = medicalReviewInfo.MedicalReviewInfo.IsClosedDialog; medicalReviewInfo.AuditState = medicalReviewInfo.MedicalReviewInfo.AuditState; @@ -428,7 +428,7 @@ namespace IRaCIS.Core.Application.Service await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview() { - LatestReplyUserId = (inDto.IsSendDialog && !medicalReview.IsSendMessage && inDto.IsHaveQuestion) ? _userInfo.Id : null, + LatestReplyUserId = (inDto.IsSendDialog && !medicalReview.IsSendMessage && inDto.IsHaveQuestion) ? _userInfo.UserRoleId : null, IsHaveQuestion = inDto.IsHaveQuestion, Questioning = inDto.Questioning, IsSendMessage = inDto.IsSendDialog && inDto.IsHaveQuestion, @@ -471,7 +471,7 @@ namespace IRaCIS.Core.Application.Service { await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview() { - LatestReplyUserId = _userInfo.Id, + LatestReplyUserId = _userInfo.UserRoleId, IsClosedDialog = inDto.IsClosedDialog, MedicalDialogCloseEnum = inDto.MedicalDialogCloseEnum, DialogCloseReason = inDto.DialogCloseReason, @@ -510,7 +510,7 @@ namespace IRaCIS.Core.Application.Service await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview() { - LatestReplyUserId = _userInfo.Id, + LatestReplyUserId = _userInfo.UserRoleId, }); var visitTaskId = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).Select(x => x.VisitTaskId).FirstOrDefaultAsync(); @@ -566,7 +566,7 @@ namespace IRaCIS.Core.Application.Service await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(x => !x.IsClosedDialog && x.Id == inDto.TaskMedicalReviewId, x => new TaskMedicalReview() { - LatestReplyUserId = _userInfo.Id, + LatestReplyUserId = _userInfo.UserRoleId, IsClosedDialog = true, MedicalDialogCloseEnum = MedicalDialogClose.IRApplyReReading, @@ -580,7 +580,7 @@ namespace IRaCIS.Core.Application.Service await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview() { - LatestReplyUserId = _userInfo.Id, + LatestReplyUserId = _userInfo.UserRoleId, DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum, }); ReadingMedicalReviewDialog dialog = new ReadingMedicalReviewDialog() @@ -617,7 +617,7 @@ namespace IRaCIS.Core.Application.Service .OrderBy(x => x.CreateTime).ToListAsync(); result.ForEach(x => { - x.IsCurrentUser = x.CreateUserId == _userInfo.Id; + x.IsCurrentUser = x.CreateUserId == _userInfo.UserRoleId; }); return (result, new { @@ -710,7 +710,7 @@ namespace IRaCIS.Core.Application.Service await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview() { - LatestReplyUserId = _userInfo.Id, + LatestReplyUserId = _userInfo.UserRoleId, DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum, DisagreeReason = inDto.DisagreeReason, IsApplyHeavyReading = inDto.IsApplyHeavyReading, @@ -784,7 +784,7 @@ namespace IRaCIS.Core.Application.Service public async Task> GetIRMedicalFeedbackList(GetIRMedicalFeedbackListInDto inDto) { var taskMedicalReviewquery = _taskMedicalReviewRepository.Where(x => x.TrialId == inDto.TrialId).Include(x => x.VisitTask) - .Where(x => x.VisitTask.DoctorUserId == _userInfo.Id) + .Where(x => x.VisitTask.DoctorUserId == _userInfo.UserRoleId) .Where(x => x.IsHaveQuestion) .WhereIf(!inDto.TaskBlindName.IsNullOrEmpty(), x => x.VisitTask.TaskBlindName == inDto.TaskBlindName) .WhereIf(inDto.SubjectId != null, x => x.VisitTask.SubjectId == inDto.SubjectId!) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs index 49e6d333e..09aac24a3 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs @@ -230,6 +230,10 @@ namespace IRaCIS.Core.Application.Service.RC //await AddSystemQuestionCriterion(); var query = _readingQuestionCriterionSystemRepository.AsQueryable() .WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName)) + .WhereIf(inDto.IsEnable!=null, x => x.IsEnable== inDto.IsEnable) + .WhereIf(inDto.IsCompleteConfig != null, x => x.IsCompleteConfig == inDto.IsCompleteConfig) + .WhereIf(inDto.CriterionGroup != null, x => x.CriterionGroup == inDto.CriterionGroup) + .WhereIf(inDto.CriterionType != null, x => x.CriterionType == inDto.CriterionType) .ProjectTo(_mapper.ConfigurationProvider); return await query.ToPagedListAsync(inDto, nameof(ReadingQuestionCriterionSystemView.ShowOrder)); diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs index 59e746a5e..b098f7af3 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs @@ -48,7 +48,136 @@ namespace IRaCIS.Core.Application.Service // return (await _iReadingImageTaskService.GetReadingQuestion(inDto.TrialReadingCriterionId, null),true); //} + /// + /// 设置项目问题导出 + /// + /// + /// + [HttpPost] + public async Task SetTrialQuestionExportResult(SetTrialQuestionExportResultInDto inDto) + { + var cDISCCodeList = inDto.QuestionList.Where(x => x.CDISCCode.IsNotNullOrEmpty()).Select(x => x.CDISCCode).ToList(); + + cDISCCodeList.AddRange(inDto.TableQuestionList.Where(x => x.CDISCCode.IsNotNullOrEmpty()).Select(x => x.CDISCCode).ToList()); + + if (cDISCCodeList.Distinct().Count() != cDISCCodeList.Count) + { + throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CDISCCodeRepeat"]); + } + + if(inDto.QuestionList.Any(x=>x.ExportResult.Contains(ExportResult.CDISC)&&x.CDISCCode.IsNullOrEmpty()) + || inDto.TableQuestionList.Any(x => x.ExportResult.Contains(ExportResult.CDISC) && x.CDISCCode.IsNullOrEmpty()) + ) + { + throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CDISCCodeCannotEmpty"]); + } + + List needAdd = new List() + { + ExportResult.DetailedTableOfAdjudicationResults, + ExportResult.DetailedTableOfIntraReaderAnalysisResults, + ExportResult.DetailedTableOfInterReaderAnalysisResults + }; + foreach (var item in inDto.QuestionList) + { + item.ExportResult= item.ExportResult.Except(needAdd).ToList(); + if (item.ExportResult.Contains(ExportResult.TableOfAssessmentResults)) + { + item.ExportResult.AddRange(needAdd); + } + var ExportResultStr=JsonConvert.SerializeObject(item.ExportResult); + await _readingQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.QuestionId, x => new ReadingQuestionTrial() + { + ExportResultStr = ExportResultStr, + CDISCCode = item.CDISCCode, + }); + + } + + foreach (var item in inDto.TableQuestionList) + { + item.ExportResult = item.ExportResult.Except(needAdd).ToList(); + if (item.ExportResult.Contains(ExportResult.TableOfAssessmentResults)) + { + item.ExportResult.AddRange(needAdd); + } + + var ExportResultStr = JsonConvert.SerializeObject(item.ExportResult); + + + await _readingTableQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.TableQuestionId, x => new ReadingTableQuestionTrial() + { + ExportResultStr = ExportResultStr, + CDISCCode = item.CDISCCode, + }); + } + + return await _readingTableQuestionTrialRepository.SaveChangesAsync(); + } + + /// + /// 获取项目的导出信息 + /// + /// + /// + [HttpPost] + public async Task GetTrialQuestionExportResult(GetTrialQuestionExportResultInDto inDto) + { + List notShowType=new List() { ReadingQestionType.Group, ReadingQestionType.Screenshot, ReadingQestionType.Summary, ReadingQestionType.Upload }; + + var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync(); + var questionList = await _readingQuestionTrialRepository.Where(x => !notShowType.Contains(x.Type) && x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId) + .OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport() + { + QuestionId = x.Id, + QuestionName = _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName, + ExportResult = x.ExportResult, + ShowOrder = x.ShowOrder, + IsTableQuestion=false, + CDISCCode = x.CDISCCode, + }).ToListAsync(); + + var questionid = questionList.Select(x => x.QuestionId).ToList(); + + var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => questionid.Contains(x.ReadingQuestionId)) + .Where(x => !notShowType.Contains(x.Type)) + .OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport() + { + QuestionId = x.ReadingQuestionId, + TableQuestionId = x.Id, + QuestionName = _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName, + ExportResult = x.ExportResult, + ShowOrder = x.ShowOrder, + IsTableQuestion=true, + CDISCCode = x.CDISCCode, + }).ToListAsync(); + + questionList.ForEach(x => + { + x.Children = tableQuestionList.Where(y => y.QuestionId == x.QuestionId).OrderBy(y => y.ShowOrder).ToList(); + }); + + List dicCode = new List() { "1","2","8" }; + var dicList = await _dictionaryRepository.Where(x => x.Parent.Code == "ExportResult") + .Where(x=> dicCode.Contains(x.Code)) + .OrderBy(x => x.ShowOrder) + .Select(x => new TrialQuestionExportDic() + { + + Code = int.Parse(x.Code), + Value = _userInfo.IsEn_Us ? x.Value : x.ValueCN, + ValueCN = _userInfo.IsEn_Us ? x.Value : x.ValueCN, + }).ToListAsync(); + + return new GetTrialQuestionExportResultOutDto() + { + CriterionType = criterionInfo.CriterionType, + CriterionGroup = criterionInfo.CriterionGroup, + DicList = dicList, + QuestionList = questionList + }; + } @@ -1027,6 +1156,7 @@ namespace IRaCIS.Core.Application.Service SynchronizeTime = DateTime.Now, IsMustGlobalReading = systemCriterion.IsMustGlobalReading, IseCRFShowInDicomReading = systemCriterion.IseCRFShowInDicomReading, + CriterionGroup = systemCriterion.CriterionGroup, IsGlobalReading = systemCriterion.IsMustGlobalReading ? true : trialCriterion.IsGlobalReading, IsReadingPeriod = systemCriterion.IsMustGlobalReading ? true : trialCriterion.IsReadingPeriod, }); diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index ffda142c6..e83bcef85 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -4,6 +4,7 @@ using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Application.Helper; using IRaCIS.Core.Application.Interfaces; using IRaCIS.Core.Application.Service.ImageAndDoc; +using IRaCIS.Core.Application.Service.OAuth; using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Application.Service.ReadingCalculate.Interface; using IRaCIS.Core.Application.ViewModel; @@ -15,6 +16,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; using NPOI.POIFS.Properties; using NPOI.SS.Formula.Functions; using Panda.DynamicWebApi.Attributes; @@ -30,6 +32,7 @@ namespace IRaCIS.Core.Application.Service IRepository _noneDicomStudyRepository, IRepository _visitTaskRepository, IRepository _trialRepository, + IRepository _userLogRepository, IRepository _readingTableQuestionAnswerRepository, IRepository _readingOncologyTaskInfoRepository, IVisitTaskHelpeService _visitTaskHelpeService, @@ -83,6 +86,126 @@ namespace IRaCIS.Core.Application.Service } #endregion + + /// + /// 删除单个表格问题标记 + /// + /// + /// + /// + [HttpPost] + [Route("/DeleteSingleTableQuestionMark/{param}")] + public async Task DeleteSingleTableQuestionMark(DeleteSingleTableQuestionMarkInDto inDto, string param) + { + var mark = await _readingTaskQuestionMarkRepository.Where(x => x.Id == inDto.Id).FirstNotNullAsync(); + + var taskid = mark.VisitTaskId; + await _readingTableQuestionAnswerRepository.DeleteFromQueryAsync(x => x.RowId == mark.RowId && x.TableQuestionId == mark.TableQuestionId); + await _readingTaskQuestionMarkRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new ReadingTaskQuestionMark() + { + InstanceId = null, + SeriesId = null, + StudyId = null, + MarkTool = string.Empty, + // PicturePath = string.Empty, 稽查需要显示截图 + NumberOfFrames = null, + MeasureData = string.Empty, + OrderMarkName = string.Empty, + OtherInstanceId = null, + OtherSeriesId = null, + OtherStudyId = null, + OtherMarkTool = string.Empty, + OtherPicturePath = string.Empty, + OtherNumberOfFrames = null, + OtherMeasureData = string.Empty, + }); + var result = await _readingTaskQuestionMarkRepository.SaveChangesAsync(); + + await _readingCalculateService.CalculateTask(new CalculateTaskInDto() + { + IsChangeOtherTask = false, + VisitTaskId = taskid, + ComputationTrigger = (ComputationTrigger)int.Parse(param), + }); + + return result; + } + + /// + /// 删除表格问题标记 + /// + /// + /// + /// + [HttpPost] + [Route("/DeleteTableQuestionMark/{param}")] + public async Task DeleteTableQuestionMark(DeleteTableQuestionMarkInDto inDto, string param) + { + await _readingTaskQuestionMarkRepository.UpdatePartialFromQueryAsync(x => x.RowId == inDto.RowId, x => new ReadingTaskQuestionMark() + { + InstanceId = null, + SeriesId = null, + StudyId = null, + MarkTool = string.Empty, + // PicturePath = string.Empty, 稽查需要显示截图 + NumberOfFrames = null, + MeasureData = string.Empty, + OrderMarkName = string.Empty, + OtherInstanceId = null, + OtherSeriesId = null, + OtherStudyId = null, + OtherMarkTool = string.Empty, + OtherPicturePath = string.Empty, + OtherNumberOfFrames = null, + OtherMeasureData = string.Empty, + }); + return await _readingTaskQuestionMarkRepository.SaveChangesAsync(); + } + + + /// + /// 保存表格问题标记 + /// + /// + /// + /// + [HttpPost] + [Route("/SaveTableQuestionMark/{param}")] + public async Task SaveTableQuestionMark(SaveTableQuestionMarkInDto inDto, string param) + { + inDto.FristAddTaskId = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == inDto.TableQuestionId && x.RowId == inDto.RowId).Select(x => x.FristAddTaskId).FirstOrDefaultAsync(); + inDto.FristAddTaskId = inDto.FristAddTaskId == null ? inDto.VisitTaskId : inDto.FristAddTaskId; + var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync(); + await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId && x.RowId == inDto.RowId.Value && x.TableQuestionId == inDto.TableQuestionId); + await _readingTableQuestionAnswerRepository.AddAsync(new ReadingTableQuestionAnswer() + { + Answer = inDto.Answer, + QuestionId = inDto.QuestionId, + TableQuestionId = inDto.TableQuestionId, + VisitTaskId = inDto.VisitTaskId, + TrialId = visitTaskInfo.TrialId, + RowIndex = inDto.RowIndex, + RowId = inDto.RowId.Value, + + }); + + await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId && x.RowId == inDto.RowId.Value && x.TableQuestionId == inDto.TableQuestionId); + + var readingTaskQuestionMark = _mapper.Map(inDto); + + await _readingTaskQuestionMarkRepository.AddAsync(readingTaskQuestionMark); + await _readingTaskQuestionMarkRepository.SaveChangesAsync(); + + await _readingCalculateService.CalculateTask(new CalculateTaskInDto() + { + IsChangeOtherTask = false, + VisitTaskId = inDto.VisitTaskId, + ComputationTrigger = (ComputationTrigger)int.Parse(param), + }); + + return inDto; + } + /// /// 获取既往病灶的OtherPicture /// @@ -99,7 +222,6 @@ namespace IRaCIS.Core.Application.Service var taskInfoList = await _generalCalculateService.GetReadingReportTaskList(rowinfo.VisitTaskId); var visitTaskIds = taskInfoList.Where(x => x.VisitTaskId != rowinfo.VisitTaskId).Select(x => x.VisitTaskId).ToList(); result = await _readingTableAnswerRowInfoRepository.Where(x => x.QuestionId == rowinfo.QuestionId && x.RowIndex == rowinfo.RowIndex && visitTaskIds.Contains(x.VisitTaskId)) - .OrderBy(x => x.VisitTask.VisitTaskNum).Select(x => new GetPreviousOtherPicturePathOutDto() { VisitTaskId = x.VisitTaskId, @@ -181,7 +303,7 @@ namespace IRaCIS.Core.Application.Service }; return await _trialDocumentRepository.Where(x => x.TrialId == inDto.TrialId - && x.TrialDocConfirmedUserList.Any(y => y.ConfirmUserId == _userInfo.Id && y.ConfirmTime != null) + && x.TrialDocConfirmedUserList.Any(y => y.ConfirmUserId == _userInfo.UserRoleId && y.ConfirmTime != null) && x.NeedConfirmedUserTypeList.Any(y => y.NeedConfirmUserTypeId == _userInfo.UserTypeId)) .WhereIf(userType == UserTypeEnum.IndependentReviewer, t => t.FileType.Code == "2" || t.FileType.Code == "6") .WhereIf(userType == UserTypeEnum.IQC, t => t.FileType.Code == "4" || t.FileType.Code == "5") @@ -331,7 +453,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task ChangeCalculationAnswer(ChangeCalculationAnswerInDto inDto) { var visitTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync(); @@ -407,7 +529,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task ReadClinicalData(ReadClinicalDataInDto inDto) { await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask @@ -784,7 +906,7 @@ namespace IRaCIS.Core.Application.Service var criterionIdInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == trialReadingCriterionId).FirstNotNullAsync(); - var groupIds = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId &&( x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.BasicTable)).Select(x => x.GroupId).Distinct().ToListAsync(); + var groupIds = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.BasicTable)).Select(x => x.GroupId).Distinct().ToListAsync(); var questionIds = await _readingQuestionTrialRepository .Where(x => x.IsShowInDicom) @@ -934,7 +1056,12 @@ namespace IRaCIS.Core.Application.Service .ToListAsync(); + //var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync(); + //result.ForEach(x => + //{ + // x.TableQuestionMarkList = tableQuestionMarkList.Where(y => y.RowId == x.RowId).ToList(); + //}); var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); @@ -963,6 +1090,7 @@ namespace IRaCIS.Core.Application.Service x.IsFirstChangeTask = x.VisitTaskId == inDto.VisitTaskId; }); result.AddRange(questionMark); + result = result.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).ThenBy(x => x.OrderMarkName).ToList(); return result; } @@ -1085,6 +1213,7 @@ namespace IRaCIS.Core.Application.Service { var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync(); + var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.TaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); var qusetionList = await _readingQuestionTrialRepository .Where(x => x.IsShowInDicom) .WhereIf(inDto.QuestionClassify != null, x => x.QuestionClassify == inDto.QuestionClassify) @@ -1260,7 +1389,7 @@ namespace IRaCIS.Core.Application.Service var pageGroupList = newPageQusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList(); pageGroupList.ForEach(x => { - FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, inDto.TaskId); + FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, tableQuestionMarkList, inDto.TaskId); }); page.Childrens = pageGroupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count == 0)).ToList(); @@ -1277,7 +1406,7 @@ namespace IRaCIS.Core.Application.Service groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList(); groupList.ForEach(x => { - FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, inDto.TaskId); + FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, tableQuestionMarkList, inDto.TaskId); }); groupList = groupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count == 0)).ToList(); @@ -1304,7 +1433,7 @@ namespace IRaCIS.Core.Application.Service /// /// /// - private async void FindChildQuestion(TrialReadQuestionData item, List questionlists, List tableQuestionLists, List tableAnswers, List tableAnsweRowInfos, List organInfos, List baseLineTableAnswer, bool isFirstChangeTask, List lastTaskTableAnswer, Guid? TaskId) + private async void FindChildQuestion(TrialReadQuestionData item, List questionlists, List tableQuestionLists, List tableAnswers, List tableAnsweRowInfos, List organInfos, List baseLineTableAnswer, bool isFirstChangeTask, List lastTaskTableAnswer, List TableQuestionMarkList, Guid? TaskId) { item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (x.GroupId == item.Id && x.ParentId == null)).ToList(); item.TableQuestions = new TrialReadTableQuestion(); @@ -1312,7 +1441,7 @@ namespace IRaCIS.Core.Application.Service item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x => x.ShowOrder).ToList(); item.TableQuestions.Questions.ForEach(x => { - x.RelationQuestions= _mapper.Map>(tableQuestionLists.Where(z => (z.DependParentId ?? default(Guid)) == x.Id)); + x.RelationQuestions = _mapper.Map>(tableQuestionLists.Where(z => (z.DependParentId ?? default(Guid)) == x.Id)); x.RelationQuestions.ForEach(y => { y.Childrens = new List(); @@ -1322,7 +1451,7 @@ namespace IRaCIS.Core.Application.Service y.LesionType = item.LesionType; y.RelationQuestions = new List(); }); - + }); var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList(); @@ -1428,6 +1557,12 @@ namespace IRaCIS.Core.Application.Service answers.Add("OtherNumberOfFrames", rowInfo == null || rowInfo.OtherNumberOfFrames == null ? string.Empty : rowInfo.OtherNumberOfFrames.ToString()); answers.Add("OtherMarkTool", rowInfo == null || rowInfo.OtherMarkTool == null ? string.Empty : rowInfo.OtherMarkTool.ToString()); answers.Add("RowIndex", x.ToString()); + + JsonSerializerSettings settings = new JsonSerializerSettings + { + FloatParseHandling = FloatParseHandling.Double, + }; + answers.Add("TableQuestionMarkList", rowInfo == null ? "[]" : JsonConvert.SerializeObject(TableQuestionMarkList.Where(x => x.RowId == rowInfo.Id).ToList(), settings)); answers.Add("RowId", rowInfo == null ? string.Empty : rowInfo.Id.ToString()); answers.Add("MarkTool", rowInfo.MarkTool); answers.Add("StudyId", rowInfo.StudyId.ToString()); @@ -1459,7 +1594,7 @@ namespace IRaCIS.Core.Application.Service { item.Childrens.ForEach(x => { - FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, TaskId); + FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, TableQuestionMarkList, TaskId); }); } } @@ -1476,7 +1611,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task SplitLesion(SplitLesionInDto inDto) { await VerifyTaskIsSign(inDto.VisitTaskId); @@ -1714,7 +1849,7 @@ namespace IRaCIS.Core.Application.Service /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task SaveImageQuality(ChangeDicomReadingQuestionAnswerInDto inDto) { inDto.UpdateMark = true; @@ -1773,7 +1908,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task ChangeDicomReadingQuestionAnswer(ChangeDicomReadingQuestionAnswerInDto inDto) { await VerifyTaskIsSign(inDto.VisitTaskId); @@ -1833,7 +1968,7 @@ namespace IRaCIS.Core.Application.Service var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new { x.QuestionId, - x.FirstAddTaskId, + x.FristAddTaskId, }).ToListAsync(); @@ -1869,7 +2004,7 @@ namespace IRaCIS.Core.Application.Service x.Id = NewId.NextGuid(); x.VisitTaskId = inDto.VisitTaskId; x.CreateTime = datetime; - x.FirstAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FirstAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId; + x.FristAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FristAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId; }); await _readingTaskQuestionMarkRepository.AddRangeAsync(markList); } @@ -1890,7 +2025,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task DeleteReadingRowAnswer(DeleteReadingRowAnswerInDto inDto) { await VerifyTaskIsSign(inDto.VisitTaskId); @@ -2071,13 +2206,29 @@ namespace IRaCIS.Core.Application.Service } + /// + /// 提交表格行信息 + /// + /// + /// + /// + [HttpPost] + [Route("/SubmitTaskRowInfo/{param}")] + public async Task SubmitTaskRowInfo(SubmitTableQuestionInDto inDto, string param) + { + inDto.ComputationTrigger = (ComputationTrigger)int.Parse(param); + + return await SubmitTableQuestion(inDto); + } + + /// /// 提交表格问题答案 提交病灶 保存病灶 /// /// /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task SubmitTableQuestion(SubmitTableQuestionInDto inDto) { SubmitTableQuestionOutDto result = new SubmitTableQuestionOutDto(); @@ -2264,7 +2415,7 @@ namespace IRaCIS.Core.Application.Service && x.QuestionId == inDto.QuestionId ).CountAsync()) + 1)) { - throw new BusinessValidationFailedException(_localizer["ReadingImage_MaxQuestion", _userInfo.IsEn_Us? questionInfo.QuestionEnName:questionInfo.QuestionName, questionInfo.MaxQuestionCount]); + throw new BusinessValidationFailedException(_localizer["ReadingImage_MaxQuestion", _userInfo.IsEn_Us ? questionInfo.QuestionEnName : questionInfo.QuestionName, questionInfo.MaxQuestionCount]); } } @@ -2476,7 +2627,7 @@ namespace IRaCIS.Core.Application.Service /// /// /// - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task SubmitDicomVisitTask(SubmitDicomVisitTaskInDto inDto) { @@ -2561,7 +2712,7 @@ namespace IRaCIS.Core.Application.Service var criterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).FirstNotNullAsync(); - var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId&&x.Type != "group") + var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.Type != "group") .WhereIf(taskInfo.SourceSubjectVisit.IsBaseLine, x => ((x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show) && (x.LimitEdit == LimitEdit.None || x.LimitEdit == LimitEdit.OnlyBaseLine))) .WhereIf(!taskInfo.SourceSubjectVisit.IsBaseLine, x => ((x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show) && (x.LimitEdit == LimitEdit.None || x.LimitEdit == LimitEdit.OnlyVisit))) .WhereIf(taskInfo.TrialReadingCriterion.CriterionType == CriterionType.PCWG3, x => x.QuestionType != QuestionType.SiteVisitForTumorEvaluation) @@ -2676,7 +2827,7 @@ namespace IRaCIS.Core.Application.Service public async Task ClearSkipReadingCache() { - await _fusionCache.RemoveAsync(CacheKeys.SkipReadingCacheKey(_userInfo.Id)); + await _fusionCache.RemoveAsync(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId)); return true; } @@ -2689,18 +2840,18 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task SetSkipReadingCache(SetSkipReadingCacheInDto inDto) { - var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync(CacheKeys.SkipReadingCacheKey(_userInfo.Id)); + var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId)); if (clearSkipReadingCache == null || clearSkipReadingCache == string.Empty) { List cacheIds = new List(); cacheIds.Add(inDto.VisitTaskId); - await _fusionCache.SetAsync(CacheKeys.SkipReadingCacheKey(_userInfo.Id), JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24)); + await _fusionCache.SetAsync(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId), JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24)); } else { List? cacheIds = JsonConvert.DeserializeObject>(clearSkipReadingCache); cacheIds.Add(inDto.VisitTaskId); - await _fusionCache.SetAsync(CacheKeys.SkipReadingCacheKey(_userInfo.Id), JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24)); + await _fusionCache.SetAsync(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId), JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24)); } return true; } @@ -2731,7 +2882,7 @@ namespace IRaCIS.Core.Application.Service #region 跳过阅片 - var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync(CacheKeys.SkipReadingCacheKey(_userInfo.Id)); + var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync(CacheKeys.SkipReadingCacheKey(_userInfo.UserRoleId)); List cacheSkipIds = new List(); @@ -2839,7 +2990,7 @@ namespace IRaCIS.Core.Application.Service List remainingItems = taskList.Select(x => x.Id).Except(cacheSkipIds).ToList(); //受试者随机固定排序 - taskList = taskList.Where(x => remainingItems.Contains(x.Id)).OrderBy(t=>t.TaskBlindName).ToList(); + taskList = taskList.Where(x => remainingItems.Contains(x.Id)).OrderBy(t => t.TaskBlindName).ToList(); // 当前受试者没有就找其他受试者 if (taskList.Count() == 0) @@ -2896,10 +3047,10 @@ namespace IRaCIS.Core.Application.Service } else { - var query = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id + var query = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.UserRoleId && x.TrialReadingCriterionId == trialReadingCriterionId && x.TaskState == TaskState.Effect) - .Where(x=> !cacheSkipIds.Contains(x.Id)); + .Where(x => !cacheSkipIds.Contains(x.Id)); var count = await query.CountAsync(); if (count == 0) { @@ -3071,17 +3222,17 @@ namespace IRaCIS.Core.Application.Service { return true; } - var startReadingTimeKey = _userInfo.Id.ToString() + "StartReadingTime"; - var startRestTimeKey = _userInfo.Id.ToString() + "StartRestTime"; + var startReadingTimeKey = _userInfo.UserRoleId.ToString() + "StartReadingTime"; + var startRestTimeKey = _userInfo.UserRoleId.ToString() + "StartRestTime"; int readingMinute = _verifyConfig.CurrentValue.ContinuousReadingTimeMin; // 为60整数 int restMinute = _verifyConfig.CurrentValue.ReadingRestTimeMin; // - var startReadingTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.StartReadingTimeKey(_userInfo.Id)); - var startRestTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.StartRestTime(_userInfo.Id)); + var startReadingTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId)); + var startRestTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.StartRestTime(_userInfo.UserRoleId)); if (startReadingTime == null && startRestTime == null) { - await _fusionCache.SetAsync(CacheKeys.StartReadingTimeKey(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); + await _fusionCache.SetAsync(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); } else if (startRestTime != null) { @@ -3094,8 +3245,8 @@ namespace IRaCIS.Core.Application.Service else { // 休息时间>10分钟 删除休息时间的缓存 记录开始阅片时间 - await _fusionCache.RemoveAsync(CacheKeys.StartRestTime(_userInfo.Id)); - await _fusionCache.SetAsync(CacheKeys.StartReadingTimeKey(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); + await _fusionCache.RemoveAsync(CacheKeys.StartRestTime(_userInfo.UserRoleId)); + await _fusionCache.SetAsync(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); } } @@ -3107,8 +3258,8 @@ namespace IRaCIS.Core.Application.Service int timespanMin = (DateTime.Now - cacheDate).Minutes; if (timespanMin > readingMinute) { - await _fusionCache.RemoveAsync(CacheKeys.StartReadingTimeKey(_userInfo.Id)); - await _fusionCache.SetAsync(CacheKeys.StartRestTime(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); + await _fusionCache.RemoveAsync(CacheKeys.StartReadingTimeKey(_userInfo.UserRoleId)); + await _fusionCache.SetAsync(CacheKeys.StartRestTime(_userInfo.UserRoleId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute / 60m, restMinute]); } @@ -3124,31 +3275,36 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - public async Task ResetReadingRestTime(Guid? userID) + public async Task ResetReadingRestTime(Guid? userRoleId) { - if (userID == null) - { - userID = _userInfo.Id; - } + var roleId = (userRoleId != null && userRoleId != Guid.Empty) ? (Guid) userRoleId : _userInfo.UserRoleId; //int readingMinute = 120; // 为60整数 int restMinute = 10; // - var startReadingTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.StartReadingTimeKey(_userInfo.Id)); - var startRestTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.StartRestTime(_userInfo.Id)); + var startReadingTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.StartReadingTimeKey(roleId)); + var startRestTime = await _fusionCache.GetOrDefaultAsync(CacheKeys.StartRestTime(roleId)); if (startRestTime != null) { var cacheStartRestTime = DateTime.Parse(startRestTime!.ToString()); int timespanMin = (DateTime.Now - cacheStartRestTime).Minutes; if (timespanMin > restMinute) { - await _fusionCache.RemoveAsync(CacheKeys.StartRestTime(_userInfo.Id)); + await _fusionCache.RemoveAsync(CacheKeys.StartRestTime(roleId)); } } else if (startReadingTime != null) { - await _fusionCache.SetAsync(CacheKeys.StartReadingTimeKey(_userInfo.Id), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); + await _fusionCache.SetAsync(CacheKeys.StartReadingTimeKey(roleId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); } + + //前端屏幕解锁才调用 + if (userRoleId == null) + { + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, OptType = UserOptType.WebUnlock }, true); + + } + return true; } @@ -3376,7 +3532,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task AddReadingTask(Guid visitTaskId, Guid? trialId = null) { // ****** 先生成阅片期 阅片期任务阅片完成之后生成肿瘤学的 如果没有阅片期 直接生成肿瘤学 *********//// diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadModuleService.cs index 16198fa3e..e25c0aba3 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadModuleService.cs @@ -15,7 +15,7 @@ namespace IRaCIS.Core.Application.Service [ApiExplorerSettings(GroupName = "Reading")] public class ReadModuleService(IRepository _subjectVisitRepository, IRepository _subjectRepository, - IRepository _userRepository, + IRepository _userRoleRepository, IRepository _trialRepository, IVisitTaskHelpeService _visitTaskHelpeService, IRepository _visitTaskRepository, @@ -860,7 +860,7 @@ namespace IRaCIS.Core.Application.Service }; readModule.StakeholderIds = stakeholderIds.Distinct().ToList(); - readModule.StakeholderNames = await _userRepository.Where(x => readModule.StakeholderIds.Contains(x.Id)).Select(x => x.FirstName + "/" + x.LastName).ToListAsync(); + readModule.StakeholderNames = await _userRoleRepository.Where(x => readModule.StakeholderIds.Contains(x.Id)).Select(x => x.IdentityUser.FullName).ToListAsync(); return readModule; } diff --git a/IRaCIS.Core.Application/Service/Reading/ShortcutKey/ShortcutKeyService.cs b/IRaCIS.Core.Application/Service/Reading/ShortcutKey/ShortcutKeyService.cs index 4bd2e0754..502f937ed 100644 --- a/IRaCIS.Core.Application/Service/Reading/ShortcutKey/ShortcutKeyService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ShortcutKey/ShortcutKeyService.cs @@ -27,7 +27,7 @@ namespace IRaCIS.Core.Application.Service public async Task> GetDoctorShortcutKey(DefaultShortcutKeyQuery inQuery) { var shortcutKeyList = await _shortcutKeyRepository.Where(x => x.ImageToolType == inQuery.ImageToolType) - .Where(x => x.UserId == _userInfo.Id) + .Where(x => x.UserId == _userInfo.UserRoleId) .ToListAsync(); var defaultshortcutKeyList = this.GetDefaultShortcutKey(); @@ -302,17 +302,17 @@ namespace IRaCIS.Core.Application.Service var shortcutKeys = GetDefaultShortcutKey(); shortcutKeys.ForEach(x => { - x.UserId = _userInfo.Id; + x.UserId = _userInfo.UserRoleId; }); - await _shortcutKeyRepository.BatchDeleteNoTrackingAsync(x => x.ImageToolType == inDto.ImageToolType && x.UserId == _userInfo.Id); + await _shortcutKeyRepository.BatchDeleteNoTrackingAsync(x => x.ImageToolType == inDto.ImageToolType && x.UserId == _userInfo.UserRoleId); await _shortcutKeyRepository.AddRangeAsync(shortcutKeys.Select(x => new ShortcutKey() { ImageToolType = inDto.ImageToolType, Keyboardkey = x.Keyboardkey, ShortcutKeyEnum = x.ShortcutKeyEnum, - UserId = _userInfo.Id, + UserId = _userInfo.UserRoleId, AltKey = x.AltKey, CtrlKey = x.CtrlKey, MetaKey = x.MetaKey, @@ -332,14 +332,14 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task SetShortcutKey(SetDefaultShortcutKey inDto) { - await _shortcutKeyRepository.BatchDeleteNoTrackingAsync(x => x.ImageToolType == inDto.ImageToolType && x.UserId == _userInfo.Id); + await _shortcutKeyRepository.BatchDeleteNoTrackingAsync(x => x.ImageToolType == inDto.ImageToolType && x.UserId == _userInfo.UserRoleId); await _shortcutKeyRepository.AddRangeAsync(inDto.ShortcutKeyList.Select(x => new ShortcutKey() { ImageToolType = inDto.ImageToolType, Keyboardkey = x.Keyboardkey, ShortcutKeyEnum = x.ShortcutKeyEnum, - UserId = _userInfo.Id, + UserId = _userInfo.UserRoleId, AltKey = x.AltKey, CtrlKey = x.CtrlKey, MetaKey = x.MetaKey, diff --git a/IRaCIS.Core.Application/Service/Reading/ShortcutKey/UserWLTemplateService.cs b/IRaCIS.Core.Application/Service/Reading/ShortcutKey/UserWLTemplateService.cs index 1887c5ade..6a43b2333 100644 --- a/IRaCIS.Core.Application/Service/Reading/ShortcutKey/UserWLTemplateService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ShortcutKey/UserWLTemplateService.cs @@ -15,7 +15,7 @@ namespace IRaCIS.Core.Application.Service /// [ApiExplorerSettings(GroupName = "Reading")] public class UserWLTemplateService(IRepository _userWLTemplateRepository, - IRepository _userRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService + IRepository _userRoleRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService { @@ -28,7 +28,7 @@ namespace IRaCIS.Core.Application.Service public async Task> GetUserWLTemplateList(UserWLTemplateQuery inQuery) { var userWLTemplateQueryable = _userWLTemplateRepository - .Where(x => x.UserId == _userInfo.Id) + .Where(x => x.UserId == _userInfo.UserRoleId) .ProjectTo(_mapper.ConfigurationProvider); return await userWLTemplateQueryable.ToListAsync(); } @@ -40,10 +40,10 @@ namespace IRaCIS.Core.Application.Service /// public async Task AddOrUpdateUserWLTemplate(UserWLTemplateAddOrEdit addOrEditUserWLTemplate) { - addOrEditUserWLTemplate.UserId = _userInfo.Id; + addOrEditUserWLTemplate.UserId = _userInfo.UserRoleId; if (addOrEditUserWLTemplate.Id == null) { - var count = await _userWLTemplateRepository.Where(x => x.UserId == _userInfo.Id).CountAsync(); + var count = await _userWLTemplateRepository.Where(x => x.UserId == _userInfo.UserRoleId).CountAsync(); if (count >= 10) { throw new BusinessValidationFailedException(_localizer["UserWLTS_MaxTemplate"]); @@ -51,12 +51,12 @@ namespace IRaCIS.Core.Application.Service } - if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.Id && x.TemplateName == addOrEditUserWLTemplate.TemplateName && x.Id != addOrEditUserWLTemplate.Id)) + if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.UserRoleId && x.TemplateName == addOrEditUserWLTemplate.TemplateName && x.Id != addOrEditUserWLTemplate.Id)) { throw new BusinessValidationFailedException(_localizer["UserWLTS_NameRepeated"]); } - if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.Id && x.WW == addOrEditUserWLTemplate.WW && x.WL == addOrEditUserWLTemplate.WL && x.Id != addOrEditUserWLTemplate.Id)) + if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.UserRoleId && x.WW == addOrEditUserWLTemplate.WW && x.WL == addOrEditUserWLTemplate.WL && x.Id != addOrEditUserWLTemplate.Id)) { throw new BusinessValidationFailedException(_localizer["UserWLTS_ContentRepeated"]); } @@ -85,7 +85,7 @@ namespace IRaCIS.Core.Application.Service public async Task GetAutoCutNextTask() { - return await _userRepository.Where(x => x.Id == _userInfo.Id).Select(x => new + return await _userRoleRepository.Where(x => x.Id == _userInfo.UserRoleId).Select(x => new { AutoCutNextTask = x.AutoCutNextTask }).FirstNotNullAsync(); @@ -100,13 +100,13 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task SetAutoCutNextTask(SetAutoCutNextTaskInDto inDto) { - await _userRepository.UpdatePartialFromQueryAsync(_userInfo.Id, x => new User() + await _userRoleRepository.UpdatePartialFromQueryAsync(_userInfo.UserRoleId, x => new UserRole() { AutoCutNextTask = inDto.AutoCutNextTask }); - await _userRepository.SaveChangesAsync(); + await _userRoleRepository.SaveChangesAsync(); return ResponseOutput.Ok(); } diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index 15258cf36..5781a1c0b 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -38,21 +38,21 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.SystemClinicalQuestionId, opt => opt.MapFrom(src => src.Id)); CreateMap() - .ForMember(d => d.CreateUser, opt => opt.Ignore()) + .ForMember(d => d.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.SystemClinicalQuestionId, opt => opt.MapFrom(src => src.Id)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.SystemTableQuestionId, u => u.MapFrom(s => s.Id)); CreateMap() .ForMember(d => d.SystemTableQuestionId, opt => opt.MapFrom(src => src.Id)) - .ForMember(d => d.CreateUser, opt => opt.Ignore()); + .ForMember(d => d.CreateUserRole, opt => opt.Ignore()); // 预览 @@ -64,25 +64,28 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap(); #endregion - + CreateMap(); + CreateMap(); CreateMap(); + CreateMap(); + CreateMap(); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null)); CreateMap(); - CreateMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + CreateMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap(); - CreateMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + CreateMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap(); - CreateMap().ReverseMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + CreateMap().ReverseMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); - CreateMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + CreateMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap().ReverseMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() @@ -115,7 +118,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.ValueCN, u => u.MapFrom(s => s.Dictionary.ValueCN)); CreateMap() - .ForMember(d => d.FristAddTaskId, u => u.MapFrom(s => s.FirstAddTaskId!.Value)); + .ForMember(d => d.FristAddTaskId, u => u.MapFrom(s => s.FristAddTaskId!.Value)); CreateMap(); CreateMap(); //CreateMap(); @@ -149,16 +152,16 @@ namespace IRaCIS.Core.Application.Service //.ForMember(t=>t.SystemCriterionNameList,u=>u.MapFrom(c=>c.SystemClinicalDataCriterionList.Select(t=>t.SystemReadingCriterion.CriterionName))) //.ForMember(t => t.SystemCriterionIdList, u => u.MapFrom(c => c.SystemClinicalDataCriterionList.Select(t => t.SystemReadingCriterion.Id))); - CreateMap().ReverseMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + CreateMap().ReverseMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap(); - CreateMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + CreateMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap(); - CreateMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + CreateMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() .ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id)); @@ -174,7 +177,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName)) .ForMember(d => d.GroupName, u => u.MapFrom(s => isEn_Us ? s.GroupEnName : s.GroupName)) .ForMember(dest => dest.ReadingCriterionPage, opt => opt.Ignore()) - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(dest => dest.ParentReadingQuestionTrial, opt => opt.Ignore()) .ForMember(dest => dest.RelevanceReadingQuestionTrial, opt => opt.Ignore()) .ForMember(dest => dest.ReadingQuestionCriterionTrial, opt => opt.Ignore()); @@ -192,20 +195,20 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.ReadingQuestionTrial.ShowOrder)) .ForMember(d => d.QuestionMark, u => u.MapFrom(s => s.ReadingTableQuestionTrial.QuestionMark)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName)) .ForMember(d => d.GroupName, u => u.MapFrom(s => isEn_Us ? s.GroupEnName : s.GroupName)) .ForMember(d => d.PageShowOrder, u => u.MapFrom(s => s.ReadingCriterionPage.ShowOrder)) .ForMember(d => d.PageName, u => u.MapFrom(s => s.ReadingCriterionPage.PageName)) - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.IsPublicPage, u => u.MapFrom(s => s.ReadingCriterionPage.IsPublicPage)); CreateMap() @@ -218,13 +221,13 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.DependShowOrder, u => u.MapFrom(s => s.DependParentQuestion.ShowOrder)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.DependShowOrder, u => u.MapFrom(s => s.DependParentQuestion.ShowOrder)); CreateMap(); @@ -243,66 +246,66 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.DependShowOrder, u => u.MapFrom(s => s.DependParentQuestion.ShowOrder)) - .ForMember(d => d.CreateUser, u => u.Ignore()); - CreateMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(d => d.CreateUserRole, u => u.Ignore()); + CreateMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); - CreateMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + CreateMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); - CreateMap().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + CreateMap().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() - .ForMember(d => d.CreateUser, u => u.Ignore()); + .ForMember(d => d.CreateUserRole, u => u.Ignore()); CreateMap() ; CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id)); CreateMap() - .ForMember(d => d.CreateUser, u => u.Ignore()) + .ForMember(d => d.CreateUserRole, u => u.Ignore()) .ForMember(d => d.ReadingTableQuestionTrialList, u => u.Ignore()) .ForMember(d => d.ReadingQuestionSystemId, u => u.MapFrom(s => s.Id)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.MergeName, u => u.MapFrom(s => s.MergeRow == null ? string.Empty : s.MergeRow.ReadingQuestionTrial.OrderMark + s.MergeRow.RowIndex.GetLesionMark())) .ForMember(d => d.SplitName, u => u.MapFrom(s => s.SplitRow == null ? string.Empty : s.SplitRow.ReadingQuestionTrial.OrderMark + s.SplitRow.RowIndex.GetLesionMark())) .ForMember(d => d.LesionType, u => u.MapFrom(s => s.ReadingQuestionTrial == null ? null : s.ReadingQuestionTrial.LesionType)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(dest => dest.DependParentQuestion, opt => opt.Ignore()) .ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id)) .ForMember(d => d.SystemTableQuestionId, u => u.MapFrom(s => s.Id)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) ; CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(dest => dest.ReadingQuestionTrialList, opt => opt.Ignore()) - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()) .ForMember(d => d.ReadingQuestionCriterionSystemId, u => u.MapFrom(s => s.Id)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() .ForMember(d => d.QuestionCount, u => u.MapFrom(s => s.ReadingQuestionSystemList.Count())); @@ -312,7 +315,7 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() .ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName)) @@ -326,14 +329,14 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() .ForMember(d => d.QuestionCount, u => u.MapFrom(s => s.ReadingQuestionTrialList.Count())); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() .ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName)) @@ -363,17 +366,17 @@ namespace IRaCIS.Core.Application.Service #region 医学审核 CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() .ForMember(x => x.ParentShowOrder, y => y.MapFrom(n => n.ParentQuestion.ShowOrder)); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() .ForMember(x => x.ParentShowOrder, y => y.MapFrom(n => n.ParentQuestion.ShowOrder)); @@ -386,7 +389,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() //.ForMember(x => x.FileList, y => y.MapFrom(n => n.FileList)) - .ForMember(x => x.CreateUserName, y => y.MapFrom(n => n.CreateUser.UserName)); + .ForMember(x => x.CreateUserName, y => y.MapFrom(n => n.CreateUserRole.IdentityUser.UserName)); #endregion @@ -395,10 +398,10 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap(); CreateMap().ReverseMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap(); #endregion @@ -411,15 +414,15 @@ namespace IRaCIS.Core.Application.Service CreateMap().ReverseMap(); CreateMap().ReverseMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap().ReverseMap() - .ForMember(dest => dest.CreateUser, opt => opt.Ignore()); + .ForMember(dest => dest.CreateUserRole, opt => opt.Ignore()); CreateMap().ReverseMap(); CreateMap() .ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime)) - .ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUser.LastName + " / " + u.CreateUser.FirstName)) + .ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUserRole.IdentityUser.FullName)) .ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id)); CreateMap() diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/Dto/CriterionCalculateDto.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/Dto/CriterionCalculateDto.cs index 269533c15..05720fa35 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/Dto/CriterionCalculateDto.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/Dto/CriterionCalculateDto.cs @@ -106,6 +106,30 @@ namespace IRaCIS.Core.Application.ViewModel } + public class TableMarkInfo + { + + public Guid VisitTaskId { get; set; } + + public Guid TrialId { get; set; } + + public Guid QuestionId { get; set; } + + public Guid? FristAddTaskId { get; set; } + + public QuestionType? QuestionType { get; set; } + public string OrderMarkName { get; set; } = string.Empty; + /// + /// 表格问题标记 + /// + public Guid? RowId { get; set; } + + public Guid? TableQuestionId { get; set; } + + public decimal? RowIndex { get; set; } + + } + public class AddTaskLesionAnswerFromLastTaskOutDto { public bool IsBaseLine { get; set; } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs index 5333bcaed..0176f0db8 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs @@ -141,7 +141,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】"); builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】"); builder.AppendLine($"【受试者Id】:【{taskInfo.Subject.Id}】"); - builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.FirstName}】"); + builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.FullName}】"); builder.AppendLine($"【阅片人Id】:【{taskInfo.DoctorUser.Id}】"); builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】"); builder.AppendLine($"【任务Id】:【{taskInfo.Id}】"); @@ -224,6 +224,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate item.TableRowInfoList = thisItemRowInfo.Select(x => new TableRowInfo() { + RowId = x.Id, RowIndex = x.RowIndex, MeasureData = x.MeasureData, OtherMeasureData = x.OtherMeasureData, diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs index 688854f61..9f3c3b844 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs @@ -32,6 +32,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate {CriterionType.Lugano2014,typeof(LuganoCalculateService) }, {CriterionType.IVUS,typeof(IVUSCalculateService) }, {CriterionType.OCT,typeof(OCTCalculateService) }, + {CriterionType.MRIPDFF,typeof(MRIPDFFCalculateService) }, }; diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs index 33890e963..7e6fb31a3 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs @@ -2707,7 +2707,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】"); builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】"); builder.AppendLine($"【受试者Id】:【{taskInfo.Subject.Id}】"); - builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.FirstName}】"); + builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.FullName}】"); builder.AppendLine($"【阅片人Id】:【{taskInfo.DoctorUser.Id}】"); builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】"); builder.AppendLine($"【任务Id】:【{taskInfo.Id}】"); @@ -3100,7 +3100,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate builder.AppendLine($"【标准Id】:【{criterionInfo.Id}】"); builder.AppendLine($"【受试者】:【{taskInfo.Subject.ShortName}】"); builder.AppendLine($"【受试者Id】:【{taskInfo.Subject.Id}】"); - builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.FirstName}】"); + builder.AppendLine($"【阅片人】:【{taskInfo.DoctorUser.FullName}】"); builder.AppendLine($"【阅片人Id】:【{taskInfo.DoctorUser.Id}】"); builder.AppendLine($"【任务】:【{taskInfo.TaskBlindName}】"); builder.AppendLine($"【任务Id】:【{taskInfo.Id}】"); diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index c8a774a9d..314af32eb 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1413,7 +1413,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new ReadingTaskQuestionMark() { VisitTaskId = visitTaskId, - FirstAddTaskId = x.FirstAddTaskId, + FristAddTaskId = x.FristAddTaskId, QuestionId = x.QuestionId, QuestionType = x.QuestionType, OrderMarkName = x.OrderMarkName, diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs index e93bfa616..0b8abe6e5 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs @@ -1412,7 +1412,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new ReadingTaskQuestionMark() { VisitTaskId = visitTaskId, - FirstAddTaskId = x.FirstAddTaskId, + FristAddTaskId = x.FristAddTaskId, QuestionId = x.QuestionId, QuestionType = x.QuestionType, OrderMarkName = x.OrderMarkName, diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs new file mode 100644 index 000000000..ec5c870a7 --- /dev/null +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs @@ -0,0 +1,745 @@ +using DocumentFormat.OpenXml.EMMA; +using IRaCIS.Core.Application.Service.Reading.Dto; +using IRaCIS.Core.Application.ViewModel; +using IRaCIS.Core.Domain.Models; +using IRaCIS.Core.Domain.Share; +using IRaCIS.Core.Infra.EFCore.Common; +using IRaCIS.Core.Infrastructure; +using MassTransit; +using Microsoft.AspNetCore.Mvc; +using System.Linq; + +namespace IRaCIS.Core.Application.Service.ReadingCalculate +{ + [ApiExplorerSettings(GroupName = "Reading")] + public class MRIPDFFCalculateService(IRepository _readingTableQuestionAnswerRepository, + IRepository _visitTaskRepository, + IRepository _readingQuestionCriterionTrialRepository, + IRepository _readingTableQuestionTrialRepository, + IRepository _readingTableAnswerRowInfoRepository, + IRepository _readingGlobalTaskInfoRepository, + IRepository _readingQuestionTrialRepository, + IRepository _subjectVisitRepository, + IRepository _organInfoRepository, + IRepository _dictionaryRepository, + IRepository _readingTaskQuestionMarkRepository, + IRepository _dicomStudyRepository, + IRepository _noneDicomStudyRepository, + IRepository _tumorAssessmentRepository, + IGeneralCalculateService _generalCalculateService, + IRepository _readingTaskQuestionAnswerRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ICriterionCalculateService + { + + + private List siteVisitForTumorList = new List(); + + /// + /// 获取阅片的计算数据 + /// + /// + /// + public async Task GetReadingCalculationData(GetReadingCalculationDataInDto inDto) + { + return new + { + }; + } + + #region 删除病灶获取起始病灶序号 + /// + /// 删除病灶获取起始病灶序号 + /// + /// + public async Task GetDeleteLesionStatrIndex(DeleteReadingRowAnswerInDto inDto) + { + return 1; + + + } + #endregion + + #region 获取阅片报告 + /// + /// 获取阅片报告 + /// + /// + /// + [HttpPost] + public async Task GetReadingReportEvaluation(GetReadingReportEvaluationInDto indto) + { + GetReadingReportEvaluationOutDto result = new GetReadingReportEvaluationOutDto(); + + result.CalculateResult = await this.GetReportVerify(new GetReportVerifyInDto() + { + VisitTaskId = indto.VisitTaskId + }); + + var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).FirstNotNullAsync(); + + + result.ReadingTaskState = visitTaskInfo.ReadingTaskState; + var taskInfoList = await _generalCalculateService.GetReadingReportTaskList(indto.VisitTaskId); + + result.VisitTaskList = taskInfoList; + + var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList(); + + var criterionId = visitTaskInfo.TrialReadingCriterionId; + var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync(); + var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync(); + + var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto() + { + QuestionId = x.Key.QuestionId, + Rowindexs = x.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList() + + }).ToListAsync(); + + var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + + var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync(); + var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync(); + var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new + { + x.TaskId, + x.GlobalVisitTask.VisitTaskNum, + x.QuestionId, + x.Answer + }).ToListAsync(); + var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync(); + var organIds = alltableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList(); + var organInfos = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync(); + + var needChangeType = new List() { + QuestionMark.Organ, + QuestionMark.Location, + QuestionMark.Part, + }; + + // 第一级 + + #region 构造问题 + List questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto() + { + QuestionId = x.Id, + GroupName = x.GroupName.LanguageName(x.GroupEnName, _userInfo.IsEn_Us), + IsShowInDicom = x.IsShowInDicom, + Type = x.Type, + GroupId = x.GroupId, + GroupEnName = x.GroupEnName, + QuestionType = x.QuestionType, + DataSource = x.DataSource, + LesionType = x.LesionType, + QuestionGenre = x.QuestionGenre, + DictionaryCode = x.DictionaryCode, + LimitEdit = x.LimitEdit, + MaxAnswerLength = x.MaxAnswerLength, + FileType = x.FileType, + TypeValue = x.TypeValue, + QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us), + ShowOrder = x.ShowOrder, + ValueType = x.ValueType, + Unit = x.Unit, + CustomUnit = x.CustomUnit, + ReportLayType = ReportLayType.Group, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, + }).ToList(); + + // 分组 + foreach (var item in questions) + { + item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto() + { + GroupName = x.GroupName.LanguageName(x.GroupEnName, _userInfo.IsEn_Us), + QuestionId = x.Id, + IsShowInDicom = x.IsShowInDicom, + QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us), + LesionType = x.LesionType, + DataSource = x.DataSource, + QuestionGenre = x.QuestionGenre, + GroupEnName = x.GroupEnName, + LimitEdit = x.LimitEdit, + MaxAnswerLength = x.MaxAnswerLength, + FileType = x.FileType, + DictionaryCode = x.DictionaryCode, + Type = x.Type, + QuestionType = x.QuestionType, + TypeValue = x.TypeValue, + ShowOrder = x.ShowOrder, + OrderMark = x.OrderMark, + ValueType = x.ValueType, + Unit = x.Unit, + CustomUnit = x.CustomUnit, + ReportLayType = ReportLayType.Question, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, + }).ToList(); + + // 问题 + foreach (var question in item.Childrens) + { + + foreach (var task in taskInfoList) + { + var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault(); + + var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault(); + question.Answer.Add(new TaskQuestionAnswer() + { + Answer = answer == null ? string.Empty : answer.Answer, + IsGlobalChange = globalAnswer == null ? false : true, + GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer, + TaskName = task.TaskName, + VisitTaskId = task.VisitTaskId, + + }); + } + + // 构造表格行数据 + + + var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList(); + + question.Childrens = new List(); + + var rowoindexs = lesionsIndexs.Where(x => x.QuestionId == question.QuestionId).Select(x => x.Rowindexs.OrderBy(y => y).ToList()).FirstOrDefault(); + rowoindexs = rowoindexs == null ? new List() : rowoindexs; + foreach (var rowoindex in rowoindexs) + { + var rowinfo = rowlist.Where(x => x.RowIndex == rowoindex).FirstOrDefault(); + question.Childrens.Add(new ReadingReportDto() + { + QuestionName = question.OrderMark + rowoindex.GetLesionMark(), + RowId = rowinfo?.Id, + IsShowInDicom = question.IsShowInDicom, + SplitOrMergeLesionName = rowinfo != null ? (rowinfo.MergeName.IsNullOrEmpty() ? rowinfo.SplitName : rowinfo.MergeName) : string.Empty, + SplitOrMergeType = rowinfo != null ? (rowinfo.SplitOrMergeType) : null, + LesionType = question.LesionType, + IsCanEditPosition = rowinfo != null ? (rowinfo.IsCanEditPosition) : false, + RowIndex = rowoindex, + BlindName = rowinfo != null ? rowinfo.BlindName : string.Empty, + ReportLayType = ReportLayType.Lesions, + }); + } + + + + + foreach (var row in question.Childrens) + { + // tableQuestion + row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto() + { + QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us), + QuestionId = x.ReadingQuestionId, + TableQuestionId = x.Id, + Type = x.Type, + IsShowInDicom = question.IsShowInDicom, + DataSource = x.DataSource, + LimitEdit = x.LimitEdit, + MaxAnswerLength = x.MaxAnswerLength, + FileType = x.FileType, + LesionType = question.LesionType, + TableQuestionType = x.TableQuestionType, + DictionaryCode = x.DictionaryCode, + QuestionMark = x.QuestionMark, + TypeValue = x.TypeValue, + RowIndex = row.RowIndex, + RowId = row.RowId, + ShowOrder = x.ShowOrder, + ValueType = x.ValueType, + CustomUnit = x.CustomUnit, + Unit = x.Unit, + ReportLayType = ReportLayType.TableQuestion, + }).ToList(); + + + foreach (var tableQuestion in row.Childrens) + { + foreach (var task in taskInfoList) + { + var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault(); + var taskQuestionAnswer = new TaskQuestionAnswer() + { + Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(), + TaskName = task.TaskName, + VisitTaskId = task.VisitTaskId, + }; + if (rowinfo != null && rowinfo.OrganInfoId != null) + { + var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault(); + + + if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark)) + { + if (_userInfo.IsEn_Us) + { + switch (tableQuestion.QuestionMark) + { + case QuestionMark.Organ: + taskQuestionAnswer.Answer = organInfo.TULOCEN; + + break; + case QuestionMark.Location: + if (organInfo.IsCanEditPosition) + { + + } + else + { + taskQuestionAnswer.Answer = organInfo.TULATEN; + + } + break; + case QuestionMark.Part: + + taskQuestionAnswer.Answer = organInfo.PartEN; + + break; + + } + + } + else + { + switch (tableQuestion.QuestionMark) + { + case QuestionMark.Organ: + taskQuestionAnswer.Answer = organInfo.TULOC; + break; + case QuestionMark.Location: + if (organInfo.IsCanEditPosition) + { + + } + else + { + taskQuestionAnswer.Answer = organInfo.TULAT; + + } + break; + case QuestionMark.Part: + taskQuestionAnswer.Answer = organInfo.Part; + break; + + } + } + + } + } + tableQuestion.Answer.Add(taskQuestionAnswer); + } + } + + + } + + + }; + } + #endregion + + + + result.TaskQuestions = questions; + + + + return result; + + + } + #endregion + + /// + /// 将上一次的访视病灶添加到这一次 + /// + /// + /// + public async Task AddTaskLesionAnswerFromLastTask(AddTaskLesionAnswerFromLastTaskInDto inDto) + { + var visitTaskId = inDto.VisitTaskId; + var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync(); + var isReadingTaskViewInOrder = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskinfo.TrialReadingCriterionId).Select(x => x.IsReadingTaskViewInOrder).FirstOrDefaultAsync(); + var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync(); + + if (!(await _readingTableQuestionAnswerRepository.AnyAsync(x => x.VisitTaskId == visitTaskId))) + { + + + + var dictionList = await _dictionaryRepository.Where(x => x.Parent.Code == "LiverSegmentation").OrderBy(x => x.ShowOrder).ToListAsync(); + + + var tableQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == LesionType.FatFraction).FirstNotNullAsync(); + + var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == tableQuestion.Id).ToListAsync(); + var LastVisitTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit && + x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId && + x.IsAnalysisCreate == taskinfo.IsAnalysisCreate && + x.DoctorUserId == taskinfo.DoctorUserId && + x.IsSelfAnalysis == taskinfo.IsSelfAnalysis && + x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect && x.ArmEnum == taskinfo.ArmEnum + ).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync(); + + + List marks = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId && x.RowId != null).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + + + marks.ForEach(x => { + + x.VisitTaskId = visitTaskId; + }); + + List rowlist = new List(); + List tableAnswerList = new List(); + + decimal num = 1; + foreach (var item in dictionList) + { + var guid = NewId.NextGuid(); + marks.ForEach(x => { + x.RowId = x.RowIndex == num ? guid : x.RowId; + }); + rowlist.Add(new ReadingTableAnswerRowInfo() + { + FristAddTaskId = visitTaskId, + FristAddTaskNum = taskinfo.VisitTaskNum, + IsCurrentTaskAdd = true, + BlindName = taskinfo.TaskBlindName, + OrderMark = tableQuestion.OrderMark + num.GetLesionMark(), + VisitTaskId = visitTaskId, + TrialId = taskinfo.TrialId, + QuestionId = tableQuestion.Id, + RowIndex = num, + Id = guid, + }); + + tableAnswerList.Add(new ReadingTableQuestionAnswer() + { + QuestionId = tableQuestion.Id, + Answer = item.Code, + TableQuestionId = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.liverSegmentation).Select(x => x.Id).FirstOrDefault(), + VisitTaskId = visitTaskId, + TrialId = taskinfo.TrialId, + RowIndex = num, + RowId = guid, + }); + + foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswerList.Any(y => y.RowId == guid && y.TableQuestionId == x.Id))) + { + tableAnswerList.Add(new ReadingTableQuestionAnswer() + { + Answer = otherQuestion.DefaultValue, + QuestionId = tableQuestion.Id, + TrialId = taskinfo.TrialId, + VisitTaskId = taskinfo.Id, + RowId = guid, + RowIndex = num, + TableQuestionId = otherQuestion.Id, + }); + } + + + num++; + } + await _readingTableAnswerRowInfoRepository.AddRangeAsync(rowlist); + await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswerList); + + await _readingTaskQuestionMarkRepository.AddRangeAsync(_mapper.Map>(marks)); + await _readingTableQuestionAnswerRepository.SaveChangesAsync(); + } + + + return new AddTaskLesionAnswerFromLastTaskOutDto() + { + IsBaseLine = taskinfo.SourceSubjectVisitId == baseLineVisitId, + }; + + } + + /// + /// 测试计算 + /// + /// + /// + /// + [HttpPost] + public async Task TestCalculate(Guid visitTaskId, QuestionType type) + { + ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(visitTaskId); + await ReadingCalculate(readingData, new List() { type }); + } + + /// + /// 计算任务 + /// + /// + /// + [HttpPost] + public async Task CalculateTask(CalculateTaskInDto inDto) + { + ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId); + readingData.IsChangeOtherTask = inDto.IsChangeOtherTask; + await ReadingCalculate(readingData); + } + + + + + /// + /// 自动计算 + /// + /// + /// + /// + public async Task ReadingCalculate(ReadingCalculateDto inDto, List? calculateType = null) + { + + await this.CalculateAvg(inDto); + inDto = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId); + var needAddList = new List(); + List calculateList = new List() + { + // 脂肪平均 + new ReadingCalculateData (){QuestionType=QuestionType.TotalMeanFraction,GetStringFun=GetFatFractionAvg}, + + // 脂肪分级 + new ReadingCalculateData (){QuestionType=QuestionType.FattyLiverGrading,GetStringFun=GetFattyLiverGrading}, + }; + + + if (calculateType != null) + { + calculateList = calculateList.Where(x => calculateType.Contains(x.QuestionType)).ToList(); + } + + + + foreach (var calculate in calculateList) + { + var item = inDto.QuestionInfo.FirstOrDefault(x => x.QuestionType == calculate.QuestionType); + + if (item != null) + { + //计算答案 + + + #region 计算答案 + if (calculate.GetDecimalFun != null) + { + item.Answer = (await calculate.GetDecimalFun(inDto)).ToString(); + + } + else if (calculate.GetDecimalNullFun != null) + { + var value = await calculate.GetDecimalNullFun(inDto); + item.Answer = value == null ? "NA" : value.Value.ToString(); + } + else if (calculate.GetStringFun != null) + { + item.Answer = await calculate.GetStringFun(inDto); + } + #endregion + // 修改修约小数位数 + + List valueOfTypes = new List() { + + ValueOfType.Decimals, + ValueOfType.Percentage + }; + + if (inDto.DigitPlaces != -1 && calculate.GetDecimalFun != null && calculate.GetDecimalNullFun != null) + { + try + { + + if (valueOfTypes.Contains(item.ValueType)) + { + item.Answer = decimal.Round(decimal.Parse(item.Answer ?? "0"), inDto.DigitPlaces, MidpointRounding.AwayFromZero).ToString("F" + inDto.DigitPlaces.ToString()); + } + } + catch (Exception) + { + + } + } + + needAddList.Add(new ReadingTaskQuestionAnswer() + { + Answer = item.Answer, + ReadingQuestionTrialId = item.QuestionId, + }); + } + } + + + + var questionIds = needAddList.Select(x => x.ReadingQuestionTrialId).ToList(); + + await _readingTaskQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => questionIds.Contains(x.ReadingQuestionTrialId) && x.VisitTaskId == inDto.VisitTaskId); + needAddList.ForEach(x => + { + x.SubjectId = inDto.SubjectId; + x.ReadingQuestionCriterionTrialId = inDto.CriterionId; + x.VisitTaskId = inDto.VisitTaskId; + x.TrialId = inDto.TrialId; + x.SubjectId = inDto.SubjectId; + }); + + await _readingTaskQuestionAnswerRepository.AddRangeAsync(needAddList); + + await _readingTaskQuestionAnswerRepository.SaveChangesAsync(); + + } + + /// + /// 获取脂肪分数平均值 + /// + /// + /// + public async Task GetFatFractionAvg(ReadingCalculateDto inDto) + { + decimal result = 0; + + var rowInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) + .SelectMany(x => x.TableRowInfoList).ToList(); + + var tableQuestionList = rowInfo.Where(x=>x.TableQuestionList.Any(x=>x.QuestionMark== QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.Yes))).SelectMany(x => x.TableQuestionList).ToList(); + + if (rowInfo.Any(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNullOrEmpty()))) + { + return string.Empty; + } + if (tableQuestionList.Count() == 0) + { + return "NE"; + } + result = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.AverageValue).Average(x => x.Answer.IsNullOrEmptyReturn0()); + return decimal.Round(result, inDto.DigitPlaces, MidpointRounding.AwayFromZero).ToString("F" + inDto.DigitPlaces.ToString()); ; + + } + + /// + /// 获取脂肪肝分级 + /// + /// + /// + public async Task GetFattyLiverGrading(ReadingCalculateDto inDto) + { + var answer = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.TotalMeanFraction).Select(x => x.Answer).FirstIsNullReturnEmpty(); + if (answer == "NE") + { + return FattyLiverClassification.NE.GetEnumInt(); + } + else if(answer == string.Empty) + { + return string.Empty; + } + + if (decimal.TryParse(answer, out var value)) + { + return value switch + { + < 5 => FattyLiverClassification.Level0.GetEnumInt(), + < 10 => FattyLiverClassification.Level1.GetEnumInt(), + < 25 => FattyLiverClassification.Level2.GetEnumInt(), + _ => FattyLiverClassification.Level3.GetEnumInt() + }; + } + + return FattyLiverClassification.NE.GetEnumInt(); + } + + /// + /// 计算平均值 + /// + /// + public async Task CalculateAvg(ReadingCalculateDto inDto) + { + // 脂肪分数的表格问题Id + var questionInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction).FirstOrDefault(); + + List tableAnswers = new List(); + + + foreach (var item in questionInfo.TableRowInfoList) + { + var avg = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.AverageValue).FirstOrDefault(); + var avgAnswer = string.Empty; + List questionMarks = new List() + { + QuestionMark.FirstMeasurement, + QuestionMark.SecondMeasurement, + QuestionMark.ThirdMeasurement, + }; + var answers = item.TableQuestionList.Where(x => questionMarks.Contains(x.QuestionMark)).Select(x=>x.Answer).ToList(); + if (answers.Count() == 3 && !answers.Any(x => x.IsNullOrEmpty())) + { + var avgAnswernum= answers.Select(x=>x.IsNullOrEmptyReturn0()).Average(x=>x); + avgAnswer = decimal.Round(avgAnswernum, inDto.DigitPlaces, MidpointRounding.AwayFromZero).ToString("F" + inDto.DigitPlaces.ToString()); + } + if(item.TableQuestionList.Where(x => x.QuestionMark== QuestionMark.IsMeasurable).Select(x => x.Answer).FirstOrDefault().EqEnum(YesOrNoOrNa.No)) + { + avgAnswer = "NE"; + } + tableAnswers.Add(new ReadingTableQuestionAnswer() + { + Answer = avgAnswer, + VisitTaskId = inDto.VisitTaskId, + QuestionId = avg.QuestionId, + TableQuestionId = avg.TableQuestionId, + TrialId = inDto.TrialId, + RowIndex = avg.RowIndex, + RowId = avg.RowId, + + }); + + await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowId == item.RowId && x.TableQuestionId == avg.TableQuestionId); + } + + await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); + await _readingTableQuestionAnswerRepository.SaveChangesAsync(); + + } + + + + public async Task GetReportVerify(GetReportVerifyInDto inDto) + { + return new GetReportVerifyOutDto() + { + + }; + } + + public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto) + { + ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId); + + var markList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync(); + var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) + .SelectMany(x => x.TableRowInfoList).ToList(); + + var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNotNullOrEmpty())).ToList(); + + if (tableQuestionList.Count() != 8) + { + throw new BusinessValidationFailedException(_localizer["MRIPDFF_AllNeedToBeMark"]); + } + + var notableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.No))).ToList(); + + + foreach (var item in notableQuestionList) + { + if (markList.Any(x => x.RowId == item.RowId && x.MeasureData.IsNotNullOrEmpty())) + { + throw new BusinessValidationFailedException(_localizer["MRIPDFF_NeedClearMark"]); + } + } + + } + } +} diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs index 923e6f585..9310e0182 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs @@ -146,7 +146,7 @@ namespace IRaCIS.Core.Application.Contracts public string Phone { get; set; } = string.Empty; public string OrganizationName { get; set; } = string.Empty; - [ExcelColumnName("UserType")] + [ExcelColumnName("Role")] public string UserTypeStr { get; set; } [JsonIgnore] diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/Interface/ITrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/Interface/ITrialSiteSurveyService.cs index 211a5d897..28c0ac131 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/Interface/ITrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/Interface/ITrialSiteSurveyService.cs @@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.Contracts public interface ITrialSiteSurveyService { Task AddOrUpdateTrialSiteSurvey(TrialSiteSurveyAddOrEdit addOrEditTrialSiteSurvey); - Task DeleteTrialSiteSurvey(Guid trialSiteSurveyId); + //Task DeleteTrialSiteSurvey(Guid trialSiteSurveyId); Task GetSiteSurveyInfo(Guid trialSiteSurveyId, Guid trialId); Task> GetTrialSiteSurveyList(TrialSiteSurveyQueryDTO surveyQueryDTO); Task GetTrialSurveyInitInfo(Guid trialId); diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index 24b56a773..b83e1601e 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -21,6 +21,17 @@ using System.Text.RegularExpressions; using static MassTransit.ValidationResultExtensions; using DocumentFormat.OpenXml.Vml.Spreadsheet; using IdentityModel.OidcClient; +using IRaCIS.Core.Domain.Models; +using MassTransit; +using DocumentFormat.OpenXml.Spreadsheet; +using StackExchange.Redis; +using Panda.DynamicWebApi.Attributes; +using IdentityModel; +using Microsoft.AspNetCore.Components.Routing; +using IRaCIS.Core.Application.ViewModel; +using Microsoft.AspNetCore.Identity; +using NPOI.SS.Formula.Functions; +using System.Security.Policy; namespace IRaCIS.Core.Application.Contracts { @@ -30,13 +41,15 @@ namespace IRaCIS.Core.Application.Contracts [ApiExplorerSettings(GroupName = "Trial")] public class TrialSiteSurveyService(IRepository _trialSiteSurveyRepository, IRepository _trialSiteUserSurveyRepository, - IRepository _userRepository, + IRepository _userRoleRepository, + IRepository _identityUserRepository, + IRepository _trialIdentityUserRepository, IRepository _trialRepository, IRepository _trialSiteRepository, IRepository _doctorRepository, IRepository _verificationCodeRepository, - IRepository _trialUserRepository, - IRepository _trialSiteUserRepository, + IRepository _trialUserRoleRepository, + IRepository _trialSiteUserRoleRepository, IDistributedLockProvider _distributedLockProvider, ITokenService _tokenService, IRepository _userTypeRepository, @@ -71,6 +84,9 @@ namespace IRaCIS.Core.Application.Contracts return ResponseOutput.Ok(); } + + #region 多账户需要修改 + /// /// 通过UserId获取Doctorid /// @@ -80,7 +96,7 @@ namespace IRaCIS.Core.Application.Contracts public async Task UseUserIDGetDoctorID(UseUserIDGetDoctorIDInDto inDto) { - var userinfo = await _userRepository.Where(x => x.Id == inDto.UserID).FirstOrDefaultAsync(); + var userinfo = await _userRoleRepository.Where(x => x.Id == inDto.UserID).FirstOrDefaultAsync(); if (userinfo != null && userinfo.DoctorId != null) { @@ -90,16 +106,16 @@ namespace IRaCIS.Core.Application.Contracts DoctorID = userinfo.DoctorId }; } - else + else { Doctor doctor = new Doctor() { - + }; var info = await _doctorRepository.AddAsync(doctor, true); - await _userRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.UserID, x => new User() + await _userRoleRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.UserID, x => new UserRole() { DoctorId = info.Id @@ -112,7 +128,7 @@ namespace IRaCIS.Core.Application.Contracts }; } - + } /// @@ -125,7 +141,7 @@ namespace IRaCIS.Core.Application.Contracts { var dockerInfo = await _doctorRepository.Where(t => t.EMail == inDto.EmailOrPhone || t.Phone == inDto.EmailOrPhone).FirstOrDefaultAsync(); - + if (dockerInfo != null) { @@ -149,7 +165,7 @@ namespace IRaCIS.Core.Application.Contracts EMail = inDto.EmailOrPhone, IsVirtual = isVirtual, AcceptingNewTrial = false, - ActivelyReading =false, + ActivelyReading = false, ResumeStatus = ResumeStatusEnum.Pass, CooperateStatus = ContractorStatusEnum.Noncooperation, @@ -165,6 +181,10 @@ namespace IRaCIS.Core.Application.Contracts } } + #endregion + + + /// /// 验证邮箱验证码 获取医生信息Id /// @@ -216,16 +236,16 @@ namespace IRaCIS.Core.Application.Contracts { EMail = inDto.EmailOrPhone, IsVirtual = isVirtual, - AcceptingNewTrial=false, - ActivelyReading=false, - CooperateStatus= ContractorStatusEnum.Noncooperation, - - ReviewStatus= ReviewerInformationConfirmStatus.ConfirmRefuse + AcceptingNewTrial = false, + ActivelyReading = false, + CooperateStatus = ContractorStatusEnum.Noncooperation, + + ReviewStatus = ReviewerInformationConfirmStatus.ConfirmRefuse }; - var info=await _doctorRepository.AddAsync(doctor,true); + var info = await _doctorRepository.AddAsync(doctor, true); - //await _userRepository.BatchUpdateNoTrackingAsync(x => x.EMail == inDto.EmailOrPhone, x => new User() + //await _userRoleRepository.BatchUpdateNoTrackingAsync(x => x.EMail == inDto.EmailOrPhone, x => new User() //{ // DoctorId = info.DoctorId, @@ -235,7 +255,7 @@ namespace IRaCIS.Core.Application.Contracts result.ReviewStatus = info.ReviewStatus; } - result.Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo() { Id= Guid.NewGuid() })); + result.Token = _tokenService.GetToken(new UserTokenInfo() { IdentityUserId = Guid.NewGuid() }); } } @@ -272,6 +292,216 @@ namespace IRaCIS.Core.Application.Contracts } + + + + #region 中心调研修改 + + /// + /// 初始登陆界面 项目基本信息+下拉框数据 + /// + /// + /// + [AllowAnonymous] + [HttpGet("{trialId:guid}")] + public async Task GetTrialSurveyInitInfo(Guid trialId) + { + var info = await _trialRepository.Where(t => t.Id == trialId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException(); + + return info; + } + + /// + /// 实际这里只会是更新 添加在login的时候做了 + /// + /// + /// + [TrialGlobalLimit("AfterStopCannNotOpt")] + public async Task AddOrUpdateTrialSiteSurvey(TrialSiteSurveyAddOrEdit addOrEditTrialSiteSurvey) + { + + if (addOrEditTrialSiteSurvey.Id != null) + { + if (await _trialSiteSurveyRepository.AnyAsync(t => t.Id == addOrEditTrialSiteSurvey.Id && t.State == TrialSiteSurveyEnum.PMCreatedAndLock)) + { + //---中心调研已锁定,不允许操作。 + return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_Locked"]); + } + } + + + if (addOrEditTrialSiteSurvey.Id == null) + { + var entity = _mapper.Map(addOrEditTrialSiteSurvey); + await _trialSiteSurveyRepository.AddAsync(entity, true); + return ResponseOutput.Ok(entity.Id.ToString()); + } + else + { + + var entity = await _trialSiteSurveyRepository.Where(t => t.Id == addOrEditTrialSiteSurvey.Id, true).Include(x => x.ReviewerUser).Include(x => x.PreliminaryUser).FirstOrDefaultAsync(); + _mapper.Map(addOrEditTrialSiteSurvey, entity); + await _trialSiteSurveyRepository.SaveChangesAsync(); + + } + return ResponseOutput.Ok(true); + } + + + /// + /// 项目Site调研用户列表 所有site的调研用户 最新的调研表的记录的用户 new + /// + /// + public async Task> TrialSiteSurveyUserList(TrialSiteUserSurveyAllQuery inQuery) + { + + //找到该中心最新的调研记录 + var groupSelectIdQuery = + _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) + + .WhereIf(!string.IsNullOrEmpty(inQuery.FormWriterKeyInfo), t => (t.UserName).Contains(inQuery.FormWriterKeyInfo) || t.Email.Contains(inQuery.FormWriterKeyInfo) || t.Phone.Contains(inQuery.FormWriterKeyInfo)) + .GroupBy(t => t.TrialSiteId) + .Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First()); + + + var query = _trialSiteUserSurveyRepository + .Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId)) + .WhereIf(inQuery.TrialRoleCode != null, t => t.TrialRoleCode == inQuery.TrialRoleCode) + .WhereIf(inQuery.UserTypeId != null, t => t.UserTypeId == inQuery.UserTypeId) + .WhereIf(inQuery.IsGenerateAccount != null, t => t.IsGenerateAccount == inQuery.IsGenerateAccount) + .WhereIf(inQuery.State != null && inQuery.State != TrialSiteUserStateEnum.OverTime, t => t.InviteState == inQuery.State) + .WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => (t.LastName + " / " + t.FirstName).Contains(inQuery.UserName)) + .WhereIf(!string.IsNullOrEmpty(inQuery.OrganizationName), t => t.OrganizationName.Contains(inQuery.OrganizationName)) + + .ProjectTo(_mapper.ConfigurationProvider); + + return await query.ToPagedListAsync(inQuery); + + } + + /// + /// 获取 项目 site的调研记录 New + /// + /// + [HttpPost] + public async Task> GetTrialSiteSurveyList(TrialSiteSurveyQueryDTO inQuery) + { + var trialSiteSurveyQueryable = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserKeyInfo), t => t.UserName.Contains(inQuery.UserKeyInfo) || t.Phone.Contains(inQuery.UserKeyInfo) || t.Email.Contains(inQuery.UserKeyInfo)) + .WhereIf(inQuery.State != null, t => t.State == inQuery.State) + .WhereIf(inQuery.UpdateTimeBegin != null, t => t.UpdateTime >= inQuery.UpdateTimeBegin) + .WhereIf(inQuery.UpdateTimeEnd != null, t => t.UpdateTime <= inQuery.UpdateTimeEnd) + + .ProjectTo(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.PreliminaryUserName), t => t.PreliminaryUser.RealName.Contains(inQuery.PreliminaryUserName)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ReviewerUserName), t => t.ReviewerUser.RealName.Contains(inQuery.ReviewerUserName)) + ; + + return await trialSiteSurveyQueryable.ToPagedListAsync(inQuery); + } + + [HttpPost] + public async Task> GetTrialSiteSurveySelectList(TrialSiteSurveySelectquery inQuery) + { + var trialSiteSurveyQueryable = _trialSiteSurveyRepository + .Where(t => t.Id != inQuery.TrialSiteSurveyId) + .Where(t => t.TrialId == inQuery.TrialId && t.TrialSiteId == inQuery.TrialSiteId).IgnoreQueryFilters() + .ProjectTo(_mapper.ConfigurationProvider); + + return await trialSiteSurveyQueryable.ToListAsync(); + } + /// + /// 驳回 New + /// + /// + [TrialGlobalLimit("AfterStopCannNotOpt")] + + public async Task SubmissionRejection(TrialSiteSubmitBackCommand trialSiteSubmitBackCommand, [FromServices] IMailVerificationService _IMailVerificationService) + { + var trialSiteSurveyId = trialSiteSubmitBackCommand.TrialSiteSurveyId; + + var survey = await _trialSiteSurveyRepository.FirstOrDefaultAsync(t => t.Id == trialSiteSurveyId); + + survey.LatestBackReason = trialSiteSubmitBackCommand.LatestBackReason; + + + if (await _trialSiteSurveyRepository.AnyAsync(t => t.State == TrialSiteSurveyEnum.PMCreatedAndLock && t.Id == trialSiteSurveyId)) + { + //---中心调研已锁定,不允许操作。 + return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_Locked"]); + } + if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) + { + survey.State = TrialSiteSurveyEnum.ToSubmit; + } + else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM) + { + var isTrialSPMJoin = await _trialRepository.AnyAsync(t => t.Id == trialSiteSubmitBackCommand.TrialId && t.IsSPMJoinSiteSurvey); + + var hasSPMOrCPM = await _trialRepository.Where(t => t.Id == trialSiteSubmitBackCommand.TrialId).AnyAsync(t => t.TrialIdentityUserList.SelectMany(t => t.TrialUserRoleList).Any(t => + t.UserRole.IdentityUser.Status == UserStateEnum.Enable + && t.UserRole.IsUserRoleDisabled == false + && (t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM)) + ); + + var isSPMjoin = isTrialSPMJoin && hasSPMOrCPM; + + if (isSPMjoin) + { + survey.State = TrialSiteSurveyEnum.CRCSubmitted; + + survey.ReviewerUserId = null; + survey.ReviewerTime = null; + } + else + { + survey.State = TrialSiteSurveyEnum.ToSubmit; + + survey.PreliminaryUserId = null; + survey.ReviewerUserId = null; + survey.PreliminaryTime = null; + survey.ReviewerTime = null; + + + } + } + + await _trialSiteSurveyRepository.SaveChangesAsync(); + + return ResponseOutput.Ok(); + } + + /// + /// 调研表废除 + /// + /// + /// + [HttpPut("{trialId:guid}/{trialSiteSurveyId:guid}")] + [TrialGlobalLimit("AfterStopCannNotOpt")] + + public async Task AbandonSiteSurvey(Guid trialSiteSurveyId) + { + var survey = (await _trialSiteSurveyRepository.FirstOrDefaultAsync(t => t.Id == trialSiteSurveyId, true)).IfNullThrowException(); + + if (survey.State != TrialSiteSurveyEnum.ToSubmit) + { + //---只允许废除未提交的记录。 + return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_CancelUnsubmittedRecord"]); + } + + survey.IsDeleted = true; + + await _trialSiteSurveyRepository.SaveChangesAsync(); + + return ResponseOutput.Ok(); + + } + + #endregion + /// /// 验证后 如果数据库该项目不存在该邮箱 那么就插入记录 存在 /// @@ -282,7 +512,7 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] [UnitOfWork] [AllowAnonymous] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task VerifySendCode(LoginDto userInfo, [FromServices] ITokenService _tokenService) { @@ -298,7 +528,7 @@ namespace IRaCIS.Core.Application.Contracts } else if (verifyRecord.ExpirationTime < DateTime.Now) { - return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_WrongVerificationCode"]); + return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_ExpiredVerificationCode"]); } else { @@ -310,7 +540,7 @@ namespace IRaCIS.Core.Application.Contracts TrialSiteSurvey? currentEntity = null; - var userList = await _trialSiteUserRepository.Where(t => t.TrialId == userInfo.TrialId && t.TrialSiteId == userInfo.TrialSiteId, false, true).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + var userList = await _trialSiteUserRoleRepository.Where(t => t.TrialId == userInfo.TrialId && t.TrialSiteId == userInfo.TrialSiteId, false, true).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); //普通登录 @@ -440,18 +670,12 @@ namespace IRaCIS.Core.Application.Contracts return ResponseOutput.Ok(new { TrialSiteSurveyId = currentEntity!.Id, - Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo() + Token = _tokenService.GetToken(new UserTokenInfo() { - Id = Guid.NewGuid(), - IsReviewer = false, - IsAdmin = false, - RealName = "SiteSurvey", + UserRoleId = Guid.NewGuid(), UserName = "SiteSurvey", - Sex = 0, - //UserType = "ShareType", UserTypeEnum = UserTypeEnum.Undefined, - Code = "SiteSurvey", - })) + }) }); #endregion @@ -459,19 +683,24 @@ namespace IRaCIS.Core.Application.Contracts private async Task UnlockSyncSiteUserAsync(Guid trialId, Guid siteId, Guid trialSiteSurveyId, List userList) { + //获取调研表用户的数据 var existList = await _trialSiteUserSurveyRepository.Where(t => t.IsHistoryUser && t.TrialSiteSurvey.TrialId == trialId && t.TrialSiteSurvey.TrialSiteId == siteId, true).ToListAsync(); + //遍历中心用户最新的状态 foreach (var item in userList) { var find = existList.FirstOrDefault(t => t.SystemUserId == item.SystemUserId); + //不存在就加入 if (find == null) { + //中心用户不在调研表里面,那么就添加到历史人员里面 item.TrialSiteSurveyId = trialSiteSurveyId; await _trialSiteUserSurveyRepository.AddAsync(item); } else { + //中心用户在调研表里面,那么就更新调研表用户的状态 find.IsHistoryUserOriginDeleted = item.IsHistoryUserOriginDeleted; } } @@ -494,7 +723,7 @@ namespace IRaCIS.Core.Application.Contracts if (find.State != TrialSiteSurveyEnum.PMCreatedAndLock && find.IsDeleted != true) { - var userList = await _trialSiteUserRepository.Where(t => t.TrialId == find.TrialId && t.TrialSiteId == find.TrialSiteId, false, true).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + var userList = await _trialSiteUserRoleRepository.Where(t => t.TrialId == find.TrialId && t.TrialSiteId == find.TrialSiteId, false, true).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); await UnlockSyncSiteUserAsync(find.TrialId, find.TrialSiteId, find.Id, userList); @@ -511,249 +740,7 @@ namespace IRaCIS.Core.Application.Contracts } - /// - /// 实际这里只会是更新 添加在login的时候做了 - /// - /// - /// - [TrialGlobalLimit( "AfterStopCannNotOpt" )] - public async Task AddOrUpdateTrialSiteSurvey(TrialSiteSurveyAddOrEdit addOrEditTrialSiteSurvey) - { - if (addOrEditTrialSiteSurvey.Id != null) - { - if (await _trialSiteSurveyRepository.AnyAsync(t => t.Id == addOrEditTrialSiteSurvey.Id && t.State == TrialSiteSurveyEnum.PMCreatedAndLock)) - { - //---中心调研已锁定,不允许操作。 - return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_Locked"]); - } - } - - - if (addOrEditTrialSiteSurvey.Id == null) - { - var entity = _mapper.Map(addOrEditTrialSiteSurvey); - await _trialSiteSurveyRepository.AddAsync(entity, true); - return ResponseOutput.Ok(entity.Id.ToString()); - } - else - { - - var entity = await _trialSiteSurveyRepository.Where(t => t.Id == addOrEditTrialSiteSurvey.Id, true).Include(x => x.ReviewerUser).Include(x => x.PreliminaryUser).FirstOrDefaultAsync(); - _mapper.Map(addOrEditTrialSiteSurvey, entity); - await _trialSiteSurveyRepository.SaveChangesAsync(); - - } - return ResponseOutput.Ok(true); - } - - - /// - /// 删除调研表 - /// - /// - /// - [HttpDelete("{trialSiteSurveyId:guid}/{trialId:guid}")] - public async Task DeleteTrialSiteSurvey(Guid trialSiteSurveyId) - { - - if (await _trialSiteSurveyRepository.AnyAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.PMCreatedAndLock)) - { - //---中心调研已锁定,不允许操作。 - return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_Locked"]); - } - - var success = await _trialSiteSurveyRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialSiteSurveyId); - - return ResponseOutput.Result(success); - } - - - /// - /// 获取 项目 site的调研记录 New - /// - /// - [HttpPost] - public async Task> GetTrialSiteSurveyList(TrialSiteSurveyQueryDTO inQuery) - { - var trialSiteSurveyQueryable = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() - .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) - .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserKeyInfo), t => t.UserName.Contains(inQuery.UserKeyInfo) || t.Phone.Contains(inQuery.UserKeyInfo) || t.Email.Contains(inQuery.UserKeyInfo)) - .WhereIf(inQuery.State != null, t => t.State == inQuery.State) - .WhereIf(inQuery.UpdateTimeBegin != null, t => t.UpdateTime >= inQuery.UpdateTimeBegin) - .WhereIf(inQuery.UpdateTimeEnd != null, t => t.UpdateTime <= inQuery.UpdateTimeEnd) - - .ProjectTo(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.PreliminaryUserName), t => t.PreliminaryUser.RealName.Contains(inQuery.PreliminaryUserName)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ReviewerUserName), t => t.ReviewerUser.RealName.Contains(inQuery.ReviewerUserName)) - ; - - return await trialSiteSurveyQueryable.ToPagedListAsync(inQuery); - } - - [HttpPost] - public async Task> GetTrialSiteSurveySelectList(TrialSiteSurveySelectquery inQuery) - { - var trialSiteSurveyQueryable = _trialSiteSurveyRepository - .Where(t => t.Id != inQuery.TrialSiteSurveyId) - .Where(t => t.TrialId == inQuery.TrialId && t.TrialSiteId == inQuery.TrialSiteId).IgnoreQueryFilters() - .ProjectTo(_mapper.ConfigurationProvider); - - return await trialSiteSurveyQueryable.ToListAsync(); - } - - /// - /// 项目Site调研用户列表 所有site的调研用户 最新的调研表的记录的用户 new - /// - /// - public async Task> TrialSiteSurveyUserList(TrialSiteUserSurveyAllQuery inQuery) - { - - - var groupSelectIdQuery = - _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) - .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) - - .WhereIf(!string.IsNullOrEmpty(inQuery.FormWriterKeyInfo), t => (t.UserName).Contains(inQuery.FormWriterKeyInfo) || t.Email.Contains(inQuery.FormWriterKeyInfo) || t.Phone.Contains(inQuery.FormWriterKeyInfo)) - .GroupBy(t => t.TrialSiteId) - .Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First()); - - - var query = _trialSiteUserSurveyRepository - .Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId)) - .WhereIf(inQuery.TrialRoleCode != null, t => t.TrialRoleCode == inQuery.TrialRoleCode) - .WhereIf(inQuery.UserTypeId != null, t => t.UserTypeId == inQuery.UserTypeId) - .WhereIf(inQuery.IsGenerateAccount != null, t => t.IsGenerateAccount == inQuery.IsGenerateAccount) - .WhereIf(inQuery.State != null && inQuery.State != TrialSiteUserStateEnum.OverTime, t => t.InviteState == inQuery.State) - .WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => (t.LastName + " / " + t.FirstName).Contains(inQuery.UserName)) - .WhereIf(!string.IsNullOrEmpty(inQuery.OrganizationName), t => t.OrganizationName.Contains(inQuery.OrganizationName)) - - .ProjectTo(_mapper.ConfigurationProvider); - - - return await query.ToPagedListAsync(inQuery); - - - - - //return await query.ToPagedListAsync(queryParam.PageIndex, queryParam.PageSize, queryParam.SortField, queryParam.Asc); - } - - - - /// - /// 初始登陆界面 项目基本信息+下拉框数据 - /// - /// - /// - [AllowAnonymous] - [HttpGet("{trialId:guid}")] - public async Task GetTrialSurveyInitInfo(Guid trialId) - { - var info = await _trialRepository.Where(t => t.Id == trialId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException(); - - return info; - } - - - /// - /// 驳回 New - /// - /// - [TrialGlobalLimit( "AfterStopCannNotOpt" )] - - public async Task SubmissionRejection(TrialSiteSubmitBackCommand trialSiteSubmitBackCommand, [FromServices] IMailVerificationService _IMailVerificationService) - { - var trialSiteSurveyId = trialSiteSubmitBackCommand.TrialSiteSurveyId; - - var survey = await _trialSiteSurveyRepository.FirstOrDefaultAsync(t => t.Id == trialSiteSurveyId); - - survey.LatestBackReason = trialSiteSubmitBackCommand.LatestBackReason; - - //User? user = null; - - //var messageToSend = new MimeMessage(); - - - if (await _trialSiteSurveyRepository.AnyAsync(t => t.State == TrialSiteSurveyEnum.PMCreatedAndLock && t.Id == trialSiteSurveyId)) - { - //---中心调研已锁定,不允许操作。 - return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_Locked"]); - } - if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) - { - - ////SPM 给填表人发 - //messageToSend.To.Add(new MailboxAddress(String.Empty, survey.Email)); - - survey.State = TrialSiteSurveyEnum.ToSubmit; - } - else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM) - { - var hasSPMOrCPM = await _trialSiteSurveyRepository.AnyAsync(t => t.TrialId == trialSiteSubmitBackCommand.TrialId && t.Trial.TrialUserList.Any(u => u.User.UserTypeEnum == UserTypeEnum.SPM || u.User.UserTypeEnum == UserTypeEnum.CPM)); - - if (hasSPMOrCPM) - { - - ////PM 给SPM发 (初审人) - //user = await _userRepository.FirstOrDefaultAsync(t => t.Id == survey.PreliminaryUserId); - - //messageToSend.To.Add(new MailboxAddress(String.Empty, survey.PreliminaryUserId == null ? survey.Email : user.EMail)); - - survey.State = TrialSiteSurveyEnum.CRCSubmitted; - - survey.ReviewerUserId = null; - survey.ReviewerTime = null; - } - else - { - - ////没有SPM 给填表人发 - //messageToSend.To.Add(new MailboxAddress(String.Empty, survey.Email)); - - survey.State = TrialSiteSurveyEnum.ToSubmit; - - survey.PreliminaryUserId = null; - survey.ReviewerUserId = null; - survey.PreliminaryTime = null; - survey.ReviewerTime = null; - - - } - } - - //await _IMailVerificationService.SiteSurveyRejectEmail(messageToSend, survey, trialSiteSubmitBackCommand.RouteUrl, user); - - await _trialSiteSurveyRepository.SaveChangesAsync(); - - return ResponseOutput.Ok(); - } - - - - - - [HttpPut("{trialId:guid}/{trialSiteSurveyId:guid}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] - - public async Task AbandonSiteSurvey(Guid trialSiteSurveyId) - { - var survey = (await _trialSiteSurveyRepository.FirstOrDefaultAsync(t => t.Id == trialSiteSurveyId, true)).IfNullThrowException(); - - if (survey.State != TrialSiteSurveyEnum.ToSubmit) - { - //---只允许废除未提交的记录。 - return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_CancelUnsubmittedRecord"]); - } - - survey.IsDeleted = true; - - await _trialSiteSurveyRepository.SaveChangesAsync(); - - return ResponseOutput.Ok(); - - } @@ -763,7 +750,7 @@ namespace IRaCIS.Core.Application.Contracts /// /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] [UnitOfWork] public async Task TrialSurveySubmit(TrialSiteSurvyeSubmitDTO siteSurvyeSubmit) { @@ -811,12 +798,19 @@ namespace IRaCIS.Core.Application.Contracts } - if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.Undefined || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator) { - var hasSPMOrCPM = await _trialSiteSurveyRepository.AnyAsync(t => t.TrialId == trialId && t.Trial.TrialUserList.Any(u => u.User.UserTypeEnum == UserTypeEnum.SPM || u.User.UserTypeEnum == UserTypeEnum.CPM)); + var hasSPMOrCPM = await _trialRepository.Where(t => t.Id == trialId).AnyAsync(t => t.TrialIdentityUserList.SelectMany(t => t.TrialUserRoleList).Any(t => + t.UserRole.IdentityUser.Status == UserStateEnum.Enable + && t.UserRole.IsUserRoleDisabled == false + && (t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM)) + ); - if (hasSPMOrCPM) + var isTrialSPMJoin = await _trialRepository.AnyAsync(t => t.Id == trialId && t.IsSPMJoinSiteSurvey); + + var isSPMjoin = isTrialSPMJoin && hasSPMOrCPM; + + if (isSPMjoin) { await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.ToSubmit, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.CRCSubmitted }); @@ -831,7 +825,7 @@ namespace IRaCIS.Core.Application.Contracts else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) { - await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.CRCSubmitted, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved, PreliminaryUserId = _userInfo.Id, PreliminaryTime = DateTime.Now }); + await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.CRCSubmitted, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved, PreliminaryUserId = _userInfo.UserRoleId, PreliminaryTime = DateTime.Now }); } else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM) @@ -839,20 +833,8 @@ namespace IRaCIS.Core.Application.Contracts var allUserList = _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ProjectTo(_mapper.ConfigurationProvider).ToList(); - //已生成的不管 管的只需要是 生成失败的并且需要生成账号的 - var needGenerateList = allUserList.Where(t => t.IsHistoryUser == false && t.IsGenerateAccount && t.IsJoin != true).ToList(); + await GenerateAccountAndSendEmail(trialId, trialSiteSurveyId, trialSiteSurvey.TrialSiteId, siteSurvyeSubmit.BaseUrl, siteSurvyeSubmit.RouteUrl, allUserList); - await GenerateAccountAsync(needGenerateList, trialId); - - //新加入的 或者历史人员退出改为加入的 - var needSendEmailList = allUserList.Where(t => (t.IsHistoryUser == false && t.IsGenerateAccount && t.IsJoin != true) || (t.IsHistoryUser == true && t.IsHistoryUserOriginDeleted == true && t.IsHistoryUserDeleted == false)).ToList(); - - await SendSiteSurveyUserJoinEmail(new TrialSiteUserSurveyJoinCommand() { TrialId = trialId, TrialSiteSurveyId = trialSiteSurveyId, RouteUrl = siteSurvyeSubmit.RouteUrl, BaseUrl = siteSurvyeSubmit.BaseUrl, UserList = needSendEmailList }); - - - var needQuitUserList = allUserList.Where(t => t.IsHistoryUser && t.IsHistoryUserOriginDeleted == false && t.IsHistoryUserDeleted == true).ToList(); - - await DealSiteUserQuitSiteAsync(trialId, trialSiteSurvey.TrialSiteId, needQuitUserList); //将历史锁定的调研表废弃 await _trialSiteSurveyRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteSurvey.TrialSiteId && t.State == TrialSiteSurveyEnum.PMCreatedAndLock && t.Id != trialSiteSurveyId, z => new TrialSiteSurvey() { IsDeleted = true }); @@ -863,254 +845,457 @@ namespace IRaCIS.Core.Application.Contracts } - - private async Task GenerateAccountAsync(List needGenerateList, Guid trialId) + private async Task GenerateAccountAndSendEmail(Guid trialId, Guid trialSiteSurveyId, Guid trialSiteId, string baseUrl, string routeUrl, List allUserList) { + //已生成的不管 管的只需要是 生成失败的并且需要生成账号的 + var needGenerateList = allUserList.Where(t => t.IsHistoryUser == false && t.IsGenerateAccount && t.IsJoin != true).ToList(); + + //新加入的 或者历史人员退出改为加入的 + var needSendEmailList = allUserList.Where(t => (t.IsHistoryUser == false && t.IsGenerateAccount && t.IsJoin != true) || (t.IsHistoryUser == true && t.IsHistoryUserOriginDeleted == true && t.IsHistoryUserDeleted == false)).ToList(); + + var trialType = _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialType).FirstOrDefault(); - foreach (var item in needGenerateList) + foreach (var item in needGenerateList.GroupBy(t => t.Email)) { + var addUserRoleList = item.ToList(); - //找下系统中是否存在该用户类型的 并且邮箱 或者手机的账户 - var sysUserInfo = await _userRepository.Where(t => t.UserTypeId == item.UserTypeId && t.EMail == item.Email).Include(t => t.UserTypeRole).FirstOrDefaultAsync(); + var first = addUserRoleList.FirstOrDefault(); + + var userEmail = item.Key; + + var userTypeIdList = item.Select(t => t.UserTypeId).ToList(); + + var existSysUser = await _identityUserRepository.Where(t => t.EMail == userEmail, true).Include(t => t.UserRoleList).FirstOrDefaultAsync(); + + #region 人员生成 - if (sysUserInfo == null) + if (existSysUser != null) { - var @lock = _distributedLockProvider.CreateLock($"UserCode"); + //账号状态设置为启用 + existSysUser.Status = UserStateEnum.Enable; - using (await @lock.AcquireAsync()) + foreach (var userTypeId in userTypeIdList) { - var saveItem = _mapper.Map(item); + var findRole = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == userTypeId); - - if (trialType == TrialType.NoneOfficial) + if (findRole != null) { - saveItem.IsTestUser = true; + //存在该角色,设置为启用 + findRole.IsUserRoleDisabled = false; + } + else + { + //不存在该角色,那么就添加 + var addRole = _mapper.Map(existSysUser); + addRole.Id = NewId.NextSequentialGuid(); + addRole.UserTypeEnum = _userTypeRepository.Where(t => t.Id == userTypeId).Select(t => t.UserTypeEnum).First(); + addRole.UserTypeId = userTypeId.Value; + addRole.IsUserRoleDisabled = false; + existSysUser.UserRoleList.Add(addRole); } - - // 中心调研生成账号 都是外部的 - saveItem.IsZhiZhun = false; - saveItem.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1; - - saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User)); - - saveItem.UserName = saveItem.UserCode; - - saveItem.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10)); - - saveItem.UserTypeEnum = _userTypeRepository.Where(t => t.Id == saveItem.UserTypeId).Select(t => t.UserTypeEnum).First(); - - - var newUser = _userRepository.AddAsync(saveItem).Result; - - - _ = _userRepository.SaveChangesAsync().Result; - - - sysUserInfo = newUser; - } - await _trialSiteUserSurveyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new TrialSiteUserSurvey() { IsGenerateSuccess = true, SystemUserId = sysUserInfo.Id }); - - } - - - //发送邮件的时候需要用到该字段 - item.SystemUserId = sysUserInfo.Id; - - } - - await _trialSiteUserSurveyRepository.SaveChangesAsync(); - } - - - private async Task SendSiteSurveyUserJoinEmail(TrialSiteUserSurveyJoinCommand joinCommand) - { - var trialSiteSurvey = await _trialSiteSurveyRepository.FirstAsync(t => t.Id == joinCommand.TrialSiteSurveyId); - - - foreach (var userInfo in joinCommand.UserList) - { - - if (userInfo.SystemUserId == null) - { - //---生成账户Id 未取到值,请排查 - throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_FailedToGenerateAccountId"]); - } - - var trialId = joinCommand.TrialId; - var userId = (Guid)userInfo.SystemUserId; - var trialSiteId = trialSiteSurvey.TrialSiteId; - - - - //判断TrialUser中是否存在 不存在就插入 - - var findTrialUser = await _trialUserRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.UserId == userId, true); - if (findTrialUser == null) - { - await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now }); - - await _mailVerificationService.SiteSurveyUserJoinEmail(trialId, userId, joinCommand.BaseUrl, joinCommand.RouteUrl); - - } - else if (findTrialUser.IsDeleted == true) - { - await _trialUserRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.UserId == userId, c => new TrialUser() - { - IsDeleted = false, - DeletedTime = null, - JoinTime = DateTime.Now, - }); - - await _mailVerificationService.SiteSurveyUserJoinEmail(trialId, userId, joinCommand.BaseUrl, joinCommand.RouteUrl); - } - - var findTrialSiteUser = await _trialSiteUserRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.UserId == userId && t.TrialSiteId == trialSiteId, true); - - if (findTrialSiteUser == null) - { - await _trialSiteUserRepository.AddAsync(new TrialSiteUser() { TrialId = trialId, TrialSiteId = trialSiteId, UserId = userId }); } else { - findTrialSiteUser.IsDeleted = false; - findTrialSiteUser.DeletedTime = null; + + //生成账户 并插入 + var generateUser = _mapper.Map(first); + + if (trialType == TrialType.NoneOfficial) + { + generateUser.IsTestUser = true; + } + + generateUser.Id = NewId.NextSequentialGuid(); + // 外部人员生成账号 都是外部的 + generateUser.IsZhiZhun = false; + + generateUser.Code = _identityUserRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1; + + generateUser.UserCode = AppSettings.GetCodeStr(generateUser.Code, nameof(IdentityUser)); + + //generateUser.UserName = generateUser.UserCode; + + + generateUser.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10)); + + generateUser.Status = UserStateEnum.Enable; + + generateUser.UserRoleList = new List() { }; + + foreach (var userTypeId in userTypeIdList) + { + var addRole = _mapper.Map(generateUser); + + addRole.Id = NewId.NextSequentialGuid(); + + addRole.UserTypeEnum = _userTypeRepository.Where(t => t.Id == userTypeId).Select(t => t.UserTypeEnum).First(); + + addRole.UserTypeId = userTypeId.Value; + + generateUser.UserRoleList.Add(addRole); + } + + var newAddUser = await _identityUserRepository.AddAsync(generateUser); + + + existSysUser = newAddUser; + } - await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable }); + #endregion + + await _identityUserRepository.SaveChangesAsync(); - await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == userInfo.Id, u => new TrialSiteUserSurvey() { IsJoin = true }); + var identityUserId = existSysUser.Id; + + #region 项目加入 + + var findTrialUser = await _trialIdentityUserRepository.Where(t => t.TrialId == trialId && t.IdentityUserId == identityUserId, true, true).Include(t => t.TrialUserRoleList).ThenInclude(t => t.UserRole).FirstOrDefaultAsync(); + + + var isNeedSendEmail = false; + + if (findTrialUser == null) + { + //没有项目参与人员 + findTrialUser = await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser() + { + IdentityUserId = identityUserId, + TrialId = trialId, + JoinTime = DateTime.Now, + + TrialUserRoleList = userTypeIdList.Select(u => new TrialUserRole() + { + TrialId = trialId, + UserId = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == u).Id, + + }).ToList() + }); + + isNeedSendEmail = true; + } + else + { + //有该人员 + //是否有该角色 + + + if (findTrialUser.IsDeleted == true) + { + findTrialUser.IsDeleted = false; + findTrialUser.DeletedTime = null; + findTrialUser.RemoveTime = null; + findTrialUser.JoinTime = DateTime.Now; + } + + + foreach (var userTypeId in userTypeIdList) + { + //userRole 可能为null + var findTrialUserRole = findTrialUser.TrialUserRoleList.Where(t => t.UserRole?.UserTypeId == userTypeId).FirstOrDefault(); + + if (findTrialUserRole == null) + { + isNeedSendEmail = true; + //添加该角色 + findTrialUser.TrialUserRoleList.Add(new TrialUserRole() { TrialUserId = findTrialUser.Id, TrialId = trialId, UserId = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == userTypeId).Id }); + } + else + { + //如果禁用,那么启用 + if (findTrialUserRole.IsDeleted == true) + { + findTrialUserRole.IsDeleted = false; + findTrialUserRole.DeletedTime = null; + } + + } + + } + } + + #endregion + + #region 中心加入 + + foreach (var userTypeId in userTypeIdList) + { + var findUserRole = existSysUser.UserRoleList.Where(t => t.UserTypeId == userTypeId).FirstOrDefault(); + + var findTrialSiteUserRole = await _trialSiteUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId && t.UserId == findUserRole.Id, true, true).FirstOrDefaultAsync(); + + if (findTrialSiteUserRole != null) + { + findTrialSiteUserRole.IsDeleted = false; + findTrialSiteUserRole.DeletedTime = null; + + } + else + { + await _trialSiteUserRoleRepository.AddAsync(new TrialSiteUserRole() { TrialId = trialId, TrialSiteId = trialSiteId, UserId = findUserRole.Id }); + } + } + + #endregion + + if (isNeedSendEmail) + { + + var dbUserType = _userTypeRepository.Where(t => userTypeIdList.Contains(t.Id)).ToList(); + + var usertyps = string.Join(',', dbUserType.Select(t => t.UserTypeName)); + + await _mailVerificationService.SiteSurveyUserJoinEmail(trialId, identityUserId, usertyps, baseUrl, routeUrl); + } + + var userJoinIdList = item.Select(t => t.Id).ToList(); + + await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => userJoinIdList.Contains(t.Id), u => new TrialSiteUserSurvey() { IsJoin = true, SystemUserId = existSysUser.Id }); + + //中心调研设置用户角色退出 + var needQuitUserList = item.Where(t => t.IsHistoryUser && t.IsHistoryUserOriginDeleted == false && t.IsHistoryUserDeleted == true).ToList(); + + var queitUserTypeIdList = needQuitUserList.Select(t => t.UserTypeId).ToList(); + + + await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId && queitUserTypeIdList.Contains(t.UserRole.UserTypeId), c => new TrialSiteUserRole() + { + IsDeleted = true, + DeletedTime = DateTime.Now, + }); + + + await _trialSiteUserRoleRepository.SaveChangesAsync(); + } - await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurvey.Id && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.Id, ReviewerTime = DateTime.Now }); - - await _userRepository.SaveChangesAsync(); - - return ResponseOutput.Ok(); - + await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.UserRoleId, ReviewerTime = DateTime.Now }); } - private async Task DealSiteUserQuitSiteAsync(Guid trialId, Guid siteId, List list) - { - var userIdList = list.Select(t => t.SystemUserId).ToList(); - - - await _trialSiteUserRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.TrialSiteId == siteId && userIdList.Contains(t.UserId), c => new TrialSiteUser() - { - IsDeleted = true, - DeletedTime = DateTime.Now, - }); - - - await _trialSiteUserRepository.SaveChangesAsync(); - } public async Task ImportGenerateAccountAndJoinTrialAsync(Guid trialId, string baseUrl, string routeUrl, List list) { - var trialType = _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialType).FirstOrDefault(); - //判断是否有系统账号 - foreach (var item in list) - { - //找下系统中是否存在该用户类型的 并且邮箱 或者手机的账户 - var sysUserInfo = await _userRepository.Where(t => t.UserTypeId == item.UserTypeId && t.EMail == item.Email).Include(t => t.UserTypeRole).FirstOrDefaultAsync(); - if (sysUserInfo == null) + foreach (var item in list.GroupBy(t => t.Email)) + { + var addUserRoleList = item.ToList(); + + var first = addUserRoleList.FirstOrDefault(); + + var userEmail = item.Key; + + var userTypeIdList = item.Select(t => t.UserTypeId).ToList(); + + var existSysUser = await _identityUserRepository.Where(t => t.EMail == userEmail, true).Include(t => t.UserRoleList).FirstOrDefaultAsync(); + + if (existSysUser != null) { - var @lock = _distributedLockProvider.CreateLock($"UserCode"); + //账号状态设置为启用 + existSysUser.Status = UserStateEnum.Enable; - using (await @lock.AcquireAsync()) + foreach (var userTypeId in userTypeIdList) { - var saveItem = _mapper.Map(item); + var findRole = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == userTypeId); - - if (trialType == TrialType.NoneOfficial) + if (findRole != null) { - saveItem.IsTestUser = true; + //存在该角色,设置为启用 + findRole.IsUserRoleDisabled = false; + } + else + { + //不存在该角色,那么就添加 + var addRole = _mapper.Map(existSysUser); + addRole.Id = NewId.NextSequentialGuid(); + addRole.UserTypeEnum = _userTypeRepository.Where(t => t.Id == userTypeId).Select(t => t.UserTypeEnum).First(); + addRole.UserTypeId = userTypeId; + addRole.IsUserRoleDisabled = false; + existSysUser.UserRoleList.Add(addRole); } - - // 中心调研生成账号 都是外部的 - saveItem.IsZhiZhun = false; - saveItem.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1; - - saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User)); - - saveItem.UserName = saveItem.UserCode; - - //saveItem.UserTypeEnum = _userTypeRepository.Where(t => t.Id == saveItem.UserTypeId).Select(t => t.UserTypeEnum).First(); - - var newUser = _userRepository.AddAsync(saveItem).Result; - - _ = _userRepository.SaveChangesAsync().Result; - - sysUserInfo = newUser; - } - item.IsGeneratedAccount = true; - - } - - var userId = sysUserInfo.Id; - var trialSiteId = item.TrialSiteId; - - //判断是否加入到项目 - var findTrialUser = await _trialUserRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.UserId == userId, true); - if (findTrialUser == null) - { - await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now }); - - await _mailVerificationService.SiteSurveyUserJoinEmail(trialId, userId, baseUrl, routeUrl); - - } - else if (findTrialUser.IsDeleted == true) - { - await _trialUserRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.UserId == userId, c => new TrialUser() - { - IsDeleted = false, - DeletedTime = null, - JoinTime = DateTime.Now, - }); - - await _mailVerificationService.SiteSurveyUserJoinEmail(trialId, userId, baseUrl, routeUrl); - } - - - var findTrialSiteUser = await _trialSiteUserRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.UserId == userId && t.TrialSiteId == trialSiteId, true); - - if (findTrialSiteUser == null) - { - await _trialSiteUserRepository.AddAsync(new TrialSiteUser() { TrialId = trialId, TrialSiteId = trialSiteId, UserId = userId }); } else { - findTrialSiteUser.IsDeleted = false; - findTrialSiteUser.DeletedTime = null; + + //生成账户 并插入 + var generateUser = _mapper.Map(first); + + if (trialType == TrialType.NoneOfficial) + { + generateUser.IsTestUser = true; + } + + generateUser.Id = NewId.NextSequentialGuid(); + + // 外部人员生成账号 都是外部的 + generateUser.IsZhiZhun = false; + + generateUser.Code = _identityUserRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1; + + generateUser.UserCode = AppSettings.GetCodeStr(generateUser.Code, nameof(IdentityUser)); + + //generateUser.UserName = generateUser.UserCode; + + generateUser.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10)); + + generateUser.Status = UserStateEnum.Enable; + + generateUser.UserRoleList = new List() { }; + + foreach (var userTypeId in userTypeIdList) + { + var addRole = _mapper.Map(generateUser); + + addRole.Id = NewId.NextSequentialGuid(); + + addRole.UserTypeEnum = _userTypeRepository.Where(t => t.Id == userTypeId).Select(t => t.UserTypeEnum).First(); + + addRole.UserTypeId = userTypeId; + + generateUser.UserRoleList.Add(addRole); + } + + var newAddUser = await _identityUserRepository.AddAsync(generateUser); + + + existSysUser = newAddUser; + } - await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable }); + await _identityUserRepository.SaveChangesAsync(); + + + var identityUserId = existSysUser.Id; + + + var findTrialUser = await _trialIdentityUserRepository.Where(t => t.TrialId == trialId && t.IdentityUserId == identityUserId, true, true).Include(t => t.TrialUserRoleList).ThenInclude(t => t.UserRole).FirstOrDefaultAsync(); + + + var isNeedSendEmail = false; + + if (findTrialUser == null) + { + //没有项目参与人员 + findTrialUser = await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser() + { + IdentityUserId = identityUserId, + TrialId = trialId, + JoinTime = DateTime.Now, + + TrialUserRoleList = userTypeIdList.Select(u => new TrialUserRole() + { + TrialId = trialId, + UserId = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == u).Id, + + }).ToList() + }); + + isNeedSendEmail = true; + } + else + { + //有该人员 + //是否有该角色 + + if (findTrialUser.IsDeleted == true) + { + findTrialUser.IsDeleted = false; + findTrialUser.DeletedTime = null; + findTrialUser.RemoveTime = null; + findTrialUser.JoinTime = DateTime.Now; + } + + + + foreach (var userTypeId in userTypeIdList) + { + var findTrialUserRole = findTrialUser.TrialUserRoleList.Where(t => t.UserRole?.UserTypeId == userTypeId).FirstOrDefault(); + + if (findTrialUserRole == null) + { + isNeedSendEmail = true; + //添加该角色 + findTrialUser.TrialUserRoleList.Add(new TrialUserRole() { TrialUserId = findTrialUser.Id, TrialId = trialId, UserId = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == userTypeId).Id }); + } + else + { + //如果禁用,那么启用 + if (findTrialUserRole.IsDeleted == true) + { + findTrialUserRole.IsDeleted = false; + findTrialUserRole.DeletedTime = null; + } + + } + + } + } + + + //加入到Site CRC + + foreach (var trialsSiteItem in addUserRoleList.GroupBy(t => t.TrialSiteId)) + { + var siteUserRoleList = trialsSiteItem.ToList(); + + foreach (var siteUserRole in siteUserRoleList) + { + var findUserRole = existSysUser.UserRoleList.Where(t => t.UserTypeId == siteUserRole.UserTypeId).FirstOrDefault(); + + if (findUserRole != null) + { + + var findTrialSiteUserRole = await _trialSiteUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == trialsSiteItem.Key && t.UserId == findUserRole.Id, true, true).FirstOrDefaultAsync(); + + if (findTrialSiteUserRole != null) + { + findTrialSiteUserRole.IsDeleted = false; + findTrialSiteUserRole.DeletedTime = null; + + } + else + { + await _trialSiteUserRoleRepository.AddAsync(new TrialSiteUserRole() { TrialId = trialId, TrialSiteId = trialsSiteItem.Key, UserId = findUserRole.Id }); + } + + } + else + { + throw new BusinessValidationFailedException("database dirty data ,pleasse check"); + } + } + + } + + if (isNeedSendEmail) + { + var dbUserType = _userTypeRepository.Where(t => userTypeIdList.Contains(t.Id)).ToList(); + var usertyps = string.Join(',', dbUserType.Select(t => t.UserTypeName)); + await _mailVerificationService.SiteSurveyUserJoinEmail(trialId, identityUserId, usertyps, baseUrl, routeUrl); + } + await _trialSiteUserRoleRepository.SaveChangesAsync(); - await _trialSiteUserRepository.SaveChangesAsync(); } - - } diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs index 8b1e2f849..4e3593cce 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs @@ -16,7 +16,8 @@ namespace IRaCIS.Core.Application.Contracts [ApiExplorerSettings(GroupName = "Trial")] public class TrialSiteUserSurveyService(IRepository _trialSiteUserSurveyRepository, IRepository _trialRepository, - IRepository _userRepository, + IRepository _userRoleRepository, + IRepository _identityUserRepository, IRepository _trialSiteSurveyRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialSiteUserSurveyService { @@ -56,11 +57,13 @@ namespace IRaCIS.Core.Application.Contracts var item = addOrEditTrialSiteUserSurvey; //找下系统中是否存在该用户类型的 并且邮箱 或者手机的账户 - var sysUserInfo = await _userRepository.Where(t => t.UserTypeId == item.UserTypeId && t.EMail == item.Email).Include(t => t.UserTypeRole).FirstOrDefaultAsync(); + var sysUserInfo = await _identityUserRepository.Where(t => t.EMail == item.Email,true).Include(t => t.UserRoleList).FirstOrDefaultAsync(); if (sysUserInfo != null) { + + if (trialType == TrialType.OfficialTrial || trialType == TrialType.Training) { @@ -97,7 +100,7 @@ namespace IRaCIS.Core.Application.Contracts if (addOrEditTrialSiteUserSurvey.UserTypeId != null) { - var existSysUser = await _userRepository.Where(t => t.EMail == addOrEditTrialSiteUserSurvey.Email && t.UserTypeId == addOrEditTrialSiteUserSurvey.UserTypeId).Include(d => d.UserTypeRole).FirstOrDefaultAsync(); + var existSysUser = await _identityUserRepository.Where(t => t.EMail == addOrEditTrialSiteUserSurvey.Email).FirstOrDefaultAsync(); if (existSysUser != null) @@ -109,8 +112,8 @@ namespace IRaCIS.Core.Application.Contracts var optEntity = await _trialSiteUserSurveyRepository.InsertOrUpdateAsync(addOrEditTrialSiteUserSurvey, true, verifyExp1); //$"该用户在系统中账户名为:{existSysUser.LastName + " / " + existSysUser.FirstName} ,与填写信息存在不一致项, 现将界面信息修改为与系统一致,可进行保存" - return ResponseOutput.NotOk(_localizer["TrialSiteUser_InconsistentInfo", existSysUser.UserTypeRole.UserTypeShortName, existSysUser.EMail, existSysUser.LastName + " / " + existSysUser.FirstName, existSysUser.Phone], - new { Id = optEntity.Id, existSysUser.LastName, existSysUser.FirstName, existSysUser.Phone, existSysUser.IsTestUser, existSysUser.IsZhiZhun }, ApiResponseCodeEnum.NeedTips); + return ResponseOutput.NotOk(_localizer["TrialSiteUser_InconsistentInfo", existSysUser.EMail, existSysUser.LastName + " / " + existSysUser.FirstName, existSysUser.Phone], + new { Id = optEntity.Id, existSysUser.LastName, existSysUser.FirstName, existSysUser.Phone }, ApiResponseCodeEnum.NeedTips); } } diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs index fdf43fac5..b7353328d 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs @@ -20,22 +20,22 @@ namespace IRaCIS.Core.Application.AutoMapper CreateMap().ForMember(d => d.Email, t => t.MapFrom(t => t.EmailOrPhone)); - CreateMap() + CreateMap() .ForMember(d => d.Id, u => u.Ignore()) - .ForMember(d => d.Phone, u => u.MapFrom(c => c.User.Phone)) - .ForMember(d => d.Email, u => u.MapFrom(c => c.User.EMail)) - .ForMember(d => d.OrganizationName, u => u.MapFrom(c => c.User.OrganizationName)) - .ForMember(d => d.UserTypeId, u => u.MapFrom(c => c.User.UserTypeId)) + .ForMember(d => d.Phone, u => u.MapFrom(c => c.UserRole.IdentityUser.Phone)) + .ForMember(d => d.Email, u => u.MapFrom(c => c.UserRole.IdentityUser.EMail)) + .ForMember(d => d.OrganizationName, u => u.MapFrom(c => c.UserRole.IdentityUser.OrganizationName)) + .ForMember(d => d.UserTypeId, u => u.MapFrom(c => c.UserRole.UserTypeId)) .ForMember(d => d.IsHistoryUser, u => u.MapFrom(c => true)) .ForMember(d => d.IsHistoryUserOriginDeleted, u => u.MapFrom(c => c.IsDeleted)) .ForMember(d => d.IsHistoryUserDeleted, u => u.MapFrom(c => c.IsDeleted)) - .ForMember(d => d.FirstName, u => u.MapFrom(c => c.User.FirstName)) - .ForMember(d => d.LastName, u => u.MapFrom(c => c.User.LastName)) + .ForMember(d => d.FirstName, u => u.MapFrom(c => c.UserRole.IdentityUser.FirstName)) + .ForMember(d => d.LastName, u => u.MapFrom(c => c.UserRole.IdentityUser.LastName)) .ForMember(d => d.IsGenerateAccount, u => u.MapFrom(c => true)) .ForMember(d => d.IsGenerateSuccess, u => u.MapFrom(c => true)) - .ForMember(d => d.SystemUserId, u => u.MapFrom(c => c.UserId)) + .ForMember(d => d.SystemUserId, u => u.MapFrom(c => c.UserRole.IdentityUser.Id)) .ForMember(d => d.IsJoin, u => u.MapFrom(c => !c.IsDeleted)) - .ForMember(d => d.CreateUser, u => u.Ignore()); + .ForMember(d => d.CreateUserRole, u => u.Ignore()); //列表 @@ -74,16 +74,16 @@ namespace IRaCIS.Core.Application.AutoMapper - CreateMap(); + CreateMap(); - CreateMap() + CreateMap() .ForMember(d => d.EMail, u => u.MapFrom(s => s.Email)); - CreateMap(); + CreateMap(); - CreateMap().ForMember(d => d.RealName, u => u.MapFrom(s => s.LastName + " / " + s.FirstName)); + CreateMap().ForMember(d => d.RealName, u => u.MapFrom(s => s.IdentityUser.FullName)); @@ -93,8 +93,11 @@ namespace IRaCIS.Core.Application.AutoMapper .ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.UserTypeRole.UserTypeEnum)); + CreateMap(); + CreateMap(); + } } } \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/Stat/StatisticsService.cs b/IRaCIS.Core.Application/Service/Stat/StatisticsService.cs index f662d038d..df344d1c9 100644 --- a/IRaCIS.Core.Application/Service/Stat/StatisticsService.cs +++ b/IRaCIS.Core.Application/Service/Stat/StatisticsService.cs @@ -18,8 +18,9 @@ namespace IRaCIS.Core.Application.Service IRepository _dictionaryRepository, IRepository _hospitalRepository, IRepository _enrollDetailRepository, - IRepository _userRepository, - IRepository _userTrialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IStatisticsService + IRepository _userRoleRepository, + IRepository _identityUserRepository, + IRepository _userTrialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IStatisticsService { @@ -48,7 +49,7 @@ namespace IRaCIS.Core.Application.Service else //不管是精鼎的pm还是我们的pm 还是运维人员 只能看到自己参与项目的统计 { - List trialIdList = _userTrialRepository.Where(u => u.UserId == _userInfo.Id).Select(u => u.TrialId).ToList(); + List trialIdList = _userTrialRepository.Where(u => u.UserId == _userInfo.UserRoleId).Select(u => u.TrialId).ToList(); trialLambda = trialLambda.And(u => trialIdList.Contains(u.Id)); } if (!string.IsNullOrWhiteSpace(inQuery.TrialCode)) @@ -370,8 +371,8 @@ namespace IRaCIS.Core.Application.Service public PageOutput GetParticipateTrialStat(ParticipateQueryDto param) { - Expression> userLambda = x => true; - Expression> userTrialLambda = x => true; + Expression> userLambda = x => true; + Expression> userTrialLambda = x => true; if (!string.IsNullOrEmpty(param.UserInfo)) { var userInfo = param.UserInfo.Trim(); @@ -385,7 +386,7 @@ namespace IRaCIS.Core.Application.Service } var userTypeEnumStr = _userInfo.UserTypeEnumStr; - var userId = _userInfo.Id; + var userId = _userInfo.UserRoleId; //PM 进来只能看到他负责的项目下的参与人员列表 @@ -406,7 +407,7 @@ namespace IRaCIS.Core.Application.Service }); var userQuery = from trialStat in trialStatQuery - join user in _userRepository.Where(userLambda) on trialStat.UserId equals user.Id + join user in _identityUserRepository.Where(userLambda) on trialStat.UserId equals user.Id select new UserParticipateTrialStat { Email = user.EMail, @@ -438,10 +439,10 @@ namespace IRaCIS.Core.Application.Service public List GetParticipateTrialList(Guid userId) { - Expression> userTrialLambda = x => x.UserId == userId; + Expression> userTrialLambda = x => x.UserId == userId; var userTypeEnum = _userInfo.UserTypeEnumStr; - var loginUserId = _userInfo.Id; + var loginUserId = _userInfo.UserRoleId; //PM 进来只能看到他负责的项目下的参与人员列表 @@ -463,7 +464,7 @@ namespace IRaCIS.Core.Application.Service CROName = cro.CROName, Expedited = trial.Expedited, Indication = trial.Indication, - UserType = userTrial.User.UserTypeRole.UserTypeShortName, + UserType = userTrial.UserRole.UserTypeRole.UserTypeShortName, TrialId = trial.Id }; diff --git a/IRaCIS.Core.Application/Service/Third-partyProject/UltrasonicDicomService.cs b/IRaCIS.Core.Application/Service/Third-partyProject/UltrasonicDicomService.cs index 7e6c03113..971ec8aaa 100644 --- a/IRaCIS.Core.Application/Service/Third-partyProject/UltrasonicDicomService.cs +++ b/IRaCIS.Core.Application/Service/Third-partyProject/UltrasonicDicomService.cs @@ -41,7 +41,7 @@ namespace IRaCIS.Core.Application.Service.Third_partyProject .WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code)) .WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName)) - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.IsDeleted == false) && t.IsDeleted == false) .Select(t => new TrialListDTO_UltrasonicDicom() { TrialId = t.Id, @@ -123,7 +123,7 @@ namespace IRaCIS.Core.Application.Service.Third_partyProject TrialSiteCode = dicomStudy.Subject.TrialSite.TrialSiteCode, - Uploader = dicomStudy.CreateUser.UserName, + Uploader = dicomStudy.CreateUserRole.IdentityUser.UserName, UploadTime = dicomStudy.CreateTime }; diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/PersonalWorkstationViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/PersonalWorkstationViewModel.cs index b04039f7e..6c20708b2 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/PersonalWorkstationViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/PersonalWorkstationViewModel.cs @@ -461,6 +461,8 @@ namespace IRaCIS.Core.Application.Contracts public bool IsHaveSysDocNeedNeedSign { get; set; } + public bool IsFirstSysDocNeedSign { get; set; } + //public List TrialNeedSignList { get; set; }=new List(); } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs index 195d80a27..2d5e168da 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs @@ -69,7 +69,7 @@ namespace IRaCIS.Core.Application.Contracts public List ModalityList { get; set; } = new List(); - public List TrialObjectNameList { get; set; } + public List TrialObjectNameList { get; set; } } @@ -163,7 +163,8 @@ namespace IRaCIS.Core.Application.Contracts public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; } - + [Comment("阅片任务产生之前 采集影像")] + public CollectImagesType CollectImagesEnum { get; set; } } @@ -1011,8 +1012,36 @@ namespace IRaCIS.Core.Application.Contracts public string SignCode { get; set; } = string.Empty; } + public class TrialSPMConfigCommand + { + public Guid Id { get; set; } + + [Comment("SPM 参与中心调研")] + public bool IsSPMJoinSiteSurvey { get; set; } + + [Comment("SPM 参与阅片人筛选")] + public bool IsSPMJoinReviewerSelect { get; set; } + + [Comment("SPM 参与重阅审批")] + public bool IsSPMJoinReReadingApproval { get; set; } + } + public class TrialConfigDTO : BasicTrialConfig { + [Comment("阅片任务产生之前 采集影像")] + public CollectImagesType CollectImagesEnum { get; set; } + + [Comment("SPM 参与中心调研")] + public bool IsSPMJoinSiteSurvey { get; set; } + + [Comment("SPM 参与阅片人筛选")] + public bool IsSPMJoinReviewerSelect { get; set; } + + [Comment("SPM 参与重阅审批")] + public bool IsSPMJoinReReadingApproval { get; set; } + + + public List TrialCriterionIds { get; set; } = new List(); public List TrialCriterionNames { get; set; } = new List(); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialExternalUserViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialExternalUserViewModel.cs index 019bf74b8..93311c74f 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialExternalUserViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialExternalUserViewModel.cs @@ -171,8 +171,10 @@ namespace IRaCIS.Core.Application.ViewModel public bool IsSystemUser { get; set; } + //public Guid SystemUserId { get; set; } + [NotDefault] - public Guid SystemUserId { get; set; } + public Guid UserTypeId { get; set; } } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialSiteViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialSiteViewModel.cs index 8c44c703c..e09765994 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialSiteViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialSiteViewModel.cs @@ -73,8 +73,6 @@ namespace IRaCIS.Core.Application.Contracts.DTO [NotDefault] public Guid TrialSiteId { get; set; } public Guid UserId { get; set; } - public DateTime? CreateTime { get; set; } = DateTime.Now; - public string UserRealName { get; set; } = String.Empty; } @@ -94,6 +92,9 @@ namespace IRaCIS.Core.Application.Contracts.DTO public string Phone { get; set; } = String.Empty; public string EMail { get; set; } = string.Empty; + public DateTime? CreateTime { get; set; } = DateTime.Now; + public string UserRealName { get; set; } = String.Empty; + } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs index f4930a553..ac1d53ad9 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs @@ -257,8 +257,10 @@ namespace IRaCIS.Application.Contracts #region 项目术语配置 - public List TrialObjectNameList { get; set; } + public List TrialObjectNameList { get; set; } #endregion + + public CollectImagesType CollectImagesEnum { get; set; } } public class TrialPacsInfo diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs index 53d4b2376..68bbb5fae 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs @@ -11,7 +11,36 @@ namespace IRaCIS.Application.Contracts { + public class TrialSiteCRCListDTO + { + public Guid Id { get; set; } + public Guid TrialId { get; set; } + + public Guid UserId { get; set; } + + public Guid IdentityUserId { get; set; } + + public string UserType { get; set; } + + public string Phone { get; set; } = String.Empty; + + public string EMail { get; set; } = string.Empty; + + public string OrganizationName { get; set; } = String.Empty; + + public string UserName { get; set; } = String.Empty; + + public string FullName { get; set; } = String.Empty; + + public bool IsDeleted { get; set; } + + public DateTime? DeletedTime { get; set; } + public DateTime UpdateTime { get; set; } + public DateTime CreateTime { get; set; } + + public Guid TrialSiteId { get; set; } + } public class UserTrialDTO : UserTrialCommand { @@ -67,38 +96,26 @@ namespace IRaCIS.Application.Contracts public class TrialMaintenanceDTO : UserTrialCommand { - //[JsonIgnore] - //public int No { get; set; } - //For MiniExcel ExcelFormat - public string State => IsDeleted ? "退出" : "加入"; - - - //[ValueMapping(text: "退出", true)] - //[ValueMapping(text: "加入", false)] [DictionaryTranslateAttribute("IsUserExitTrial")] public bool IsDeleted { get; set; } - //[ExporterHeader(Format = "yyyy-mm-DD hh:mm:ss")] - [ExcelFormat("yyyy-MM-dd hh:mm:ss")] + [DictionaryTranslateAttribute("IsSiteDisable")] + + public bool RoleIsDeleted { get; set; } + public DateTime? DeletedTime { get; set; } - //[ExporterHeader(Format = "yyyy-mm-DD")] - [ExcelFormat("yyyy-MM-dd")] public DateTime? RemoveTime { get; set; } - public string RemoveTimeStr=> RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty; + public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty; - //[ExporterHeader(Format = "yyyy-mm-DD")] - [ExcelFormat("yyyy-MM-dd")] public DateTime? JoinTime { get; set; } public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty; - //[ExporterHeader(Format = "yyyy-mm-DD hh:mm:ss")] - [ExcelFormat("yyyy-MM-dd HH:mm:ss")] public DateTime CreateTime { get; set; } @@ -122,6 +139,86 @@ namespace IRaCIS.Application.Contracts } + public class TrialIdentityUserDto + { + public Guid Id { get; set; } + + public Guid TrialId { get; set; } + + public Guid IdentityUserId { get; set; } + + public string Phone { get; set; } = String.Empty; + + public string EMail { get; set; } = string.Empty; + + public string OrganizationName { get; set; } = String.Empty; + + public string UserName { get; set; } = String.Empty; + + public string FullName { get; set; } = String.Empty; + + public bool IsDeleted { get; set; } + + public UserStateEnum Status { get; set; } + + public DateTime CreateTime { get; set; } + public DateTime UpdateTime { get; set; } + + [ExcelFormat("yyyy-MM-dd")] + public DateTime? RemoveTime { get; set; } + + [ExcelFormat("yyyy-MM-dd")] + public DateTime? JoinTime { get; set; } + + //public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty; + //public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty; + + + public List TrialUserRoleList { get; set; } + + } + + + public class TrialUserRoleScreeningDto + { + public Guid TrialId { get; set; } + + public Guid UserId => Id; + public Guid Id { get; set; } + + public Guid IdentityUserId { get; set; } + + public string Phone { get; set; } = String.Empty; + + public string EMail { get; set; } = string.Empty; + + public string OrganizationName { get; set; } = String.Empty; + + public string UserName { get; set; } = String.Empty; + + public string FullName { get; set; } = String.Empty; + + public string UserTypeShortName { get; set; } + + public bool IsSelect { get; set; } + } + + public class TrialIdentityUserRoleDto + { + public Guid Id { get; set; } + + public string UserTypeShortName { get; set; } + + public UserTypeEnum UserTypeEnum { get; set; } + + public bool IsUserRoleDisabled { get; set; } + + public bool IsDeleted { get; set; } + + public DateTime CreateTime { get; set; } + public DateTime UpdateTime { get; set; } + } + public class TrialCRCUploadImageList_Export : ExcelExportInfo { @@ -150,19 +247,19 @@ namespace IRaCIS.Application.Contracts /// /// 数据 /// - public object Data { get; set; } + public object Data { get; set; } } public class ExportTemplateServiceDto : ExportTemplateAsyncDto { public IRepository commonDocumentRepository { get; set; } - public IWebHostEnvironment hostEnvironment { get; set; } + public IWebHostEnvironment hostEnvironment { get; set; } public bool IsEnglish { get; set; } } - public class VisitJudgeExportInfo: ExcelExportInfo + public class VisitJudgeExportInfo : ExcelExportInfo { public int VisitCount { get; set; } @@ -292,8 +389,6 @@ namespace IRaCIS.Application.Contracts public Guid TrialSiteId { get; set; } - public int? UserCount { get; set; } - public string TrialSiteCode { get; set; } = String.Empty; public string TrialSiteName { get; set; } = String.Empty; @@ -377,6 +472,8 @@ namespace IRaCIS.Application.Contracts public string OrganizationName { get; set; } = String.Empty; public UserTypeEnum? UserTypeEnum { get; set; } + + public bool? IsUserRoleDisabled { get; set; } } public class TrialUserScreeningDTO : TrialUserAddCommand @@ -409,14 +506,37 @@ namespace IRaCIS.Application.Contracts public class TrialUserAddCommand { + [NotDefault] + public Guid IdentityUserId { get; set; } + + [NotDefault] public Guid UserId { get; set; } + [NotDefault] public Guid TrialId { get; set; } } + public class TrialUserSendJoinEmailCommand + { + [NotDefault] + public Guid TrialId { get; set; } + + [NotDefault] + public Guid IdentityUserId { get; set; } + + public string BaseUrl { get; set; } = string.Empty; + public string RouteUrl { get; set; } = string.Empty; + + } + public class UpdateTrialUserRoleCommand + { + public List IdList { get; set; } + + public bool IsDeleted { get; set; } + } public class UpdateTrialUserCommand { diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/ITrialMaintenanceService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/ITrialMaintenanceService.cs index 99668f051..05dcd4675 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/ITrialMaintenanceService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/ITrialMaintenanceService.cs @@ -5,10 +5,10 @@ namespace IRaCIS.Application.Interfaces { public interface ITrialMaintenanceService { - Task AddTrialUsers(TrialUserAddCommand[] userTrialCommands); - Task DeleteMaintenanceUser(Guid id, bool isDelete); - Task> GetMaintenanceUserList(TrialMaintenanceQuery param); - Task> GetSiteCRCScreeningList(SiteCRCQuery param); - Task> GetTrialUserScreeningList(TrialUserQuery trialUserQuery); + //Task AddTrialUsers(TrialUserAddCommand[] userTrialCommands); + //Task DeleteMaintenanceUser(Guid id, bool isDelete); + //Task> GetMaintenanceUserList(TrialMaintenanceQuery param); + //Task> GetSiteCRCScreeningList(SiteCRCQuery param); + //Task> GetTrialUserScreeningList(TrialUserQuery trialUserQuery); } } \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index d41bdbca1..36045e187 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -39,10 +39,10 @@ namespace IRaCIS.Core.Application { return await _trialRepository .Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.SPMApproved).Count() > 0) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.CRCSubmitted).Count() > 0) - .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id }) + .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.UserRoleId }) .OrderByDescending(t => t.ApprovalRequiredCount).ToPagedListAsync(inQuery); } @@ -70,10 +70,12 @@ namespace IRaCIS.Core.Application else { var trialDocStat = await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)) - .Count() > 0) - .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, userTypeId = _userInfo.UserTypeId }) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.IsDeleted == false && + t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) + && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)).Count() > 0 + ) + .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.IdentityUserId, userTypeId = _userInfo.UserTypeId }) .OrderByDescending(t => t.WaitSignCount) .ToPagedListAsync(inQuery); @@ -101,7 +103,7 @@ namespace IRaCIS.Core.Application var query = _trialRepository .Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(t => new CheckToBeDoneDto() { TrialId = t.Id, @@ -122,11 +124,11 @@ namespace IRaCIS.Core.Application var result = await query.ToPagedListAsync(inQuery, defalutSortArray); var totalToBeCheckedCount = await _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(u => u.CheckState == CheckStateEnum.ToCheck).CountAsync(); var totalToBeRepliedCount = await _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeDialogList.OrderByDescending(t => t.CreateTime).First().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).CountAsync(); @@ -148,7 +150,7 @@ namespace IRaCIS.Core.Application { var query = _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.OriginalReReadingTask.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed) .GroupBy(t => new { t.OriginalReReadingTask.Trial.ExperimentName, t.OriginalReReadingTask.Trial.ResearchProgramNo, t.OriginalReReadingTask.Trial.TrialCode, t.OriginalReReadingTask.TrialId }) .Select(g => new ReReadingApplyToBeDoneDto() @@ -169,7 +171,7 @@ namespace IRaCIS.Core.Application var toBeApprovalCount = _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.OriginalReReadingTask.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed).Count(); return ResponseOutput.Ok(result, new { TotalToBeApprovalCount = toBeApprovalCount }); @@ -190,7 +192,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(t => new ReviewerSelectToBeDoneDto() { TrialId = t.Id, @@ -208,7 +210,7 @@ namespace IRaCIS.Core.Application var toBeApprovalCount = await _enrollRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).CountAsync(); return ResponseOutput.Ok(result, new { ToBeApprovalCount = toBeApprovalCount }); ; @@ -226,7 +228,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(t => new GetPMClinicalDataToBeDoneListOutDto() { TrialId = t.Id, @@ -246,7 +248,7 @@ namespace IRaCIS.Core.Application var all = await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(t => new GetPMClinicalDataToBeDoneListOutDto() { @@ -275,7 +277,7 @@ namespace IRaCIS.Core.Application [FromServices] IRepository _trialRepository) { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(t => new ReviewerSelectToBeDoneDto() { TrialId = t.Id, @@ -294,7 +296,7 @@ namespace IRaCIS.Core.Application var toBeApprovalCount = await _enrollRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).CountAsync(); return ResponseOutput.Ok(result, new { TotalToBeApprovalCount = toBeApprovalCount }); ; @@ -315,7 +317,7 @@ namespace IRaCIS.Core.Application { var query = _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.OriginalReReadingTask.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed) .GroupBy(t => new { t.OriginalReReadingTask.Trial.ExperimentName, t.OriginalReReadingTask.Trial.ResearchProgramNo, t.OriginalReReadingTask.Trial.TrialCode, t.OriginalReReadingTask.TrialId }) .Select(g => new ReReadingApprovalToBeDoneDto() @@ -336,7 +338,7 @@ namespace IRaCIS.Core.Application var toBeApprovalCount = _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.OriginalReReadingTask.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed).Count(); return ResponseOutput.Ok(result, new { TotalToBeApprovalCount = toBeApprovalCount }); @@ -363,7 +365,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) //.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm)) .Select(t => new ImageClinicalDataToBeDoneDto() { @@ -405,7 +407,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) //.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm)) .Select(t => new ImageClinicalDataToBeDoneDto() { @@ -466,7 +468,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(t => new ImageQuestionToBeDoneDto() { TrialId = t.Id, @@ -474,11 +476,11 @@ namespace IRaCIS.Core.Application ExperimentName = t.ExperimentName, TrialCode = t.TrialCode, - UrgentCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + UrgentCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .SelectMany(c => c.QCChallengeList) .Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC && u.SubjectVisit.IsUrgent).Count(), - ToBeDealedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + ToBeDealedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .SelectMany(c => c.QCChallengeList) .Where(u => u.IsClosed == false && (u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC || u.LatestReplyUserId == null)).Count(), @@ -491,8 +493,8 @@ namespace IRaCIS.Core.Application var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .SelectMany(c => c.QCChallengeList) .Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC).Count(); @@ -514,7 +516,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(t => new ImageCheckQuestionToBeDoneDto() { TrialId = t.Id, @@ -522,10 +524,10 @@ namespace IRaCIS.Core.Application ExperimentName = t.ExperimentName, TrialCode = t.TrialCode, - UrgentCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + UrgentCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply && u.IsUrgent).Count(), - ToBeReplyedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + ToBeReplyedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count() }).Where(x => x.ToBeReplyedCount > 0); @@ -537,8 +539,8 @@ namespace IRaCIS.Core.Application var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count(); return ResponseOutput.Ok(result, new { TotalToBeReplyedCount = toBeDealedCount }); @@ -560,7 +562,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(t => new ImageReUploadToBeDoneDto() { TrialId = t.Id, @@ -568,11 +570,11 @@ namespace IRaCIS.Core.Application ExperimentName = t.ExperimentName, TrialCode = t.TrialCode, UrgentCount = t.SubjectVisitList - .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.IsUrgent && ((u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading) || u.IsQCConfirmedReupload)).Count(), ToBeReUploadCount = t.SubjectVisitList - .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => (u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading) || (u.IsQCConfirmedReupload)).Count(), }).Where(x => x.ToBeReUploadCount > 0); @@ -583,7 +585,7 @@ namespace IRaCIS.Core.Application var result = await query.ToPagedListAsync(inQuery, defalutSortArray); var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(u => (u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading) || (u.IsQCConfirmedReupload)).Count(); return ResponseOutput.Ok(result, new { TotalToBeReUploadCount = toBeDealedCount }); @@ -607,7 +609,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView)) .Select(t => new ImageSubmittedToBeDoneDto() { TrialId = t.Id, @@ -615,12 +617,12 @@ namespace IRaCIS.Core.Application ExperimentName = t.ExperimentName, TrialCode = t.TrialCode, UrgentCount = t.SubjectVisitList - .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.SubmitState == SubmitStateEnum.ToSubmit && (u.IsEnrollmentConfirm || u.PDState == PDStateEnum.PDProgress || u.Trial.IsUrgent || u.Subject.IsUrgent)/*u.IsUrgent*/).Count(), ToBeDealedCount = t.SubjectVisitList - .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count(), }).Where(x => x.ToBeDealedCount > 0); @@ -633,8 +635,8 @@ namespace IRaCIS.Core.Application var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count(); return ResponseOutput.Ok(result, new { TotalToBeDealedCount = toBeDealedCount }); @@ -663,7 +665,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit) .Select(t => new ImageQualityToBeDoneDto() { @@ -673,15 +675,15 @@ namespace IRaCIS.Core.Application TrialCode = t.TrialCode, // 待审核 加急的(待领取 已领取)-- 领取了 还没做完 就是待审核 - UrgentCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && u.IsUrgent).Count(), + UrgentCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && u.IsUrgent).Count(), //待领取量 ToBeClaimedCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed && t.AuditState != AuditStateEnum.QCFailed) - .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count(), + .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count(), //待审核通过,统计从已领取到QC提交之间的 已领取 待审核 审核中 (审核完成 领取人就会清理 所以只用查询当前领取人是自己的就好了) - ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id).Count() + ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId).Count() }).Where(x => x.ToBeClaimedCount + x.ToBeReviewedCount > 0); @@ -693,13 +695,14 @@ namespace IRaCIS.Core.Application var toBeClaimedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed && t.AuditState != AuditStateEnum.QCFailed) - .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count(); + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)) + && t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed && t.AuditState != AuditStateEnum.QCFailed) + .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count(); var toBeReviwedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(u => u.CurrentActionUserId == _userInfo.Id).Count(); + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(u => u.CurrentActionUserId == _userInfo.UserRoleId).Count(); return ResponseOutput.Ok(result, new { TotalToBeClaimedCount = toBeClaimedCount, TotalToBeReviewedCount = toBeReviwedCount }); @@ -721,7 +724,7 @@ namespace IRaCIS.Core.Application { var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(t => new ImageQuestionToBeDoneDto() { TrialId = t.Id, @@ -729,10 +732,10 @@ namespace IRaCIS.Core.Application ExperimentName = t.ExperimentName, TrialCode = t.TrialCode, UrgentCount = t.SubjectVisitList.SelectMany(c => c.QCChallengeList) - .Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator && u.SubjectVisit.IsUrgent).Count(), + .Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator && u.SubjectVisit.IsUrgent).Count(), ToBeDealedCount = t.SubjectVisitList.SelectMany(c => c.QCChallengeList) - .Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(), + .Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(), }).Where(x => x.ToBeDealedCount > 0); ; @@ -742,9 +745,9 @@ namespace IRaCIS.Core.Application var toBeDealedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .SelectMany(c => c.QCChallengeList) - .Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(); + .Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(); return ResponseOutput.Ok(result, new { TotalToBeDealedCount = toBeDealedCount }); @@ -775,7 +778,7 @@ namespace IRaCIS.Core.Application { - var newQuery = _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + var newQuery = _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Select(c => new IRImageReadingToBeDoneDto() { TrialId = c.TrialId, @@ -785,7 +788,7 @@ namespace IRaCIS.Core.Application CriterionName = c.CriterionName, TrialReadingCriterionId = c.Id, - UrgentCount = c.VisitTaskList.AsQueryable().Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect) + UrgentCount = c.VisitTaskList.AsQueryable().Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect) // 前序 不存在 未一致性核查未通过的 .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum)) //前序 不存在 未生成任务的访视 @@ -795,7 +798,7 @@ namespace IRaCIS.Core.Application .Count(t => t.IsUrgent), - UnReadCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect) + UnReadCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect) // 前序 不存在 未一致性核查未通过的 .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum)) //前序 不存在 未生成任务的访视 @@ -807,7 +810,7 @@ namespace IRaCIS.Core.Application - HaveSignedCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) + HaveSignedCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count(), }).Where(x => x.UnReadCount > 0); @@ -885,9 +888,9 @@ namespace IRaCIS.Core.Application var result = await newQuery.ToPagedListAsync(inQuery, defalutSortArray); var toBeDealedCount = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .SelectMany(t => t.VisitTaskList) - .Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect && t.TrialReadingCriterion.IsSigned == true && t.TrialReadingCriterion.IsConfirm == true) + .Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect && t.TrialReadingCriterion.IsSigned == true && t.TrialReadingCriterion.IsConfirm == true) // 前序 不存在 未一致性核查未通过的 .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum)) //前序 不存在 未生成任务的访视 @@ -913,8 +916,8 @@ namespace IRaCIS.Core.Application { var query = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.Id) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.UserRoleId) .GroupBy(t => new { t.TrialId, @@ -957,8 +960,8 @@ namespace IRaCIS.Core.Application var toBeDealedCount = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.IsClosedDialog == false && t.VisitTask.DoctorUserId == _userInfo.Id) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.IsClosedDialog == false && t.VisitTask.DoctorUserId == _userInfo.UserRoleId) .Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.MIM) //.Where(u => u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM) .Count(); @@ -990,8 +993,8 @@ namespace IRaCIS.Core.Application #region 废弃不能对包含聚合或子查询的表达式执行聚合函数 var query = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .GroupBy(t => new { t.TrialId, @@ -1028,16 +1031,16 @@ namespace IRaCIS.Core.Application var toBeReplyedQuery = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IndependentReviewer && u.AuditState == MedicalReviewAuditState.Auditing); var toBeReplyedCount = toBeReplyedQuery.Count(); var tobeReviewedCount = _taskMedicalReviewRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .Where(u => u.AuditState != MedicalReviewAuditState.HaveSigned && u.LatestReplyUser.UserTypeEnum != UserTypeEnum.IndependentReviewer).Count(); @@ -1089,9 +1092,9 @@ namespace IRaCIS.Core.Application if (!_userInfo.IsAdmin) { var list = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) && - !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).Count() > 0) + !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.UserRoleId && t.ConfirmTime != null)).Count() > 0) .Select(t => t.Id).ToListAsync(); return list; @@ -1115,30 +1118,38 @@ namespace IRaCIS.Core.Application var isInternal = _userInfo.IsZhiZhun; var needSignTrialCount = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) - && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).Count() > 0).CountAsync(); + && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)).Count() > 0).CountAsync(); - var needSignSysDocCont = await _systemDocumentRepository - .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)) - //外部人员 只签署 文档类型枚举值有值的 + var needSignSysDocCont = await _systemDocumentRepository.AsQueryable(true) + .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)) + //外部人员 只签署 外部需要签署的 .WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter) .SelectMany(t => t.NeedConfirmedUserTypeList) .CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId); + //电子阅片声明是否已经签署 + + var isfirstSysDocNeedSign = await _systemDocumentRepository.AsQueryable(true) + .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)) + //外部人员 只签署 外部需要签署的 + .WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter) + .SelectMany(t => t.NeedConfirmedUserTypeList) + .AnyAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId && t.SystemDocument.FileType.Code == "-1"); var signedTrialCount = await _trialDocumentRepository.AsQueryable(true) - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) - .Where(t => t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).CountAsync(); + .Where(t => t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)).CountAsync(); - var signedSysDocCont = await _systemDocumentRepository - .Where(t => t.IsDeleted == false && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)) + var signedSysDocCont = await _systemDocumentRepository.AsQueryable(true) + .Where(t => t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)) .SelectMany(t => t.NeedConfirmedUserTypeList) .CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId); var siteSurveyCount = await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing) - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.SPMApproved).Count() > 0) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.CRCSubmitted).Count() > 0) .CountAsync(); @@ -1167,7 +1178,7 @@ namespace IRaCIS.Core.Application var record = new UserToBeDoneRecord() { - + IsFirstSysDocNeedSign = isfirstSysDocNeedSign, IsHaveSysDocNeedNeedSign = needSignSysDocCont > 0, //TrialNeedSignList= trialNeedSignList, @@ -1178,7 +1189,7 @@ namespace IRaCIS.Core.Application SysSignedDocCount = signedSysDocCont, SysNoticeUnReadCount = await _systemNoticeRepository.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.SystemNotice_NoticeStateEnum.HavePublished - && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id)) + && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.UserRoleId)) .Where(t => t.EndDate == null || t.EndDate != null && t.EndDate > appDateTimeNow) .CountAsync(), @@ -1187,16 +1198,16 @@ namespace IRaCIS.Core.Application PM_SiteSurveryCount = isPM ? siteSurveyCount : 0, PM_CheckCount = isPM ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(u => u.SubjectVisitList.Any(t => t.CheckState == CheckStateEnum.ToCheck || (t.CheckState == CheckStateEnum.CVIng && t.CheckChallengeDialogList.OrderByDescending(t => t.CreateTime).First().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))).CountAsync() : 0, PM_ReviewerSelectCount = isPM ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.InviteIntoGroup).Count() > 0).CountAsync() : 0, PM_ReReadingApprovalCount = isPM ? await _visitTaskReReadingRepository - .Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.OriginalReReadingTask.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed) .GroupBy(t => t.OriginalReReadingTask.TrialId) .Select(g => new ReReadingApplyToBeDoneDto() @@ -1207,7 +1218,7 @@ namespace IRaCIS.Core.Application }).Where(x => x.ToBeApprovalCount > 0).CountAsync() : 0, PM_ClinicalDataCount = isPM ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.ReadModuleList.Where(u => u.IsCRCConfirm && !u.IsPMConfirm).Count() > 0).CountAsync() : 0, #endregion @@ -1215,34 +1226,34 @@ namespace IRaCIS.Core.Application #region CRC CRC_ImageSubmitCount = isCRC ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView)) - .Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)).Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count() > 0).CountAsync() : 0, + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView)) + .Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count() > 0).CountAsync() : 0, CRC_ImageQuestionCount = isCRC ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)).SelectMany(c => c.QCChallengeList) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).SelectMany(c => c.QCChallengeList) .Where(u => u.IsClosed == false && (u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC || u.LatestReplyUserId == null)).Count() > 0).CountAsync() : 0, CRC_CheckQuestionCount = isCRC ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count() > 0).CountAsync() : 0, CRC_ImageReUploadCount = isCRC ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.SubjectVisitList - .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + .Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => (u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading) || (u.IsQCConfirmedReupload)).Count() > 0).CountAsync() : 0, CRC_ClinicalDataTobeDoneCount = isCRC ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.ReadingClinicalDataList.Where(x => !x.IsSign && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC).Count() > 0).CountAsync() : 0, CRC_ClinialDataTobeConfirmCount = isCRC ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.ReadModuleList.Where(x => !x.IsCRCConfirm).Count() > 0).CountAsync() : 0, @@ -1256,11 +1267,11 @@ namespace IRaCIS.Core.Application SPM_SiteSurveryCount = isSPMOrCPM ? siteSurveyCount : 0, SPM_ReviewerApprovalCount = isSPMOrCPM ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count() > 0).CountAsync() : 0, SPM_ReReadingApprovalCount = isSPMOrCPM ? await _visitTaskReReadingRepository - .Where(t => t.OriginalReReadingTask.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.OriginalReReadingTask.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed) .GroupBy(t => t.OriginalReReadingTask.TrialId) .Select(g => new ReReadingApplyToBeDoneDto() @@ -1277,23 +1288,23 @@ namespace IRaCIS.Core.Application IQC_IamgeQCCount = isIQC ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit) .Select(t => new { //待领取量 ToBeClaimedCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed) - .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count(), + .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count(), //待审核通过,统计从已领取到QC提交之间的 已领取 待审核 审核中 (审核完成 领取人就会清理 所以只用查询当前领取人是自己的就好了) - ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id).Count() + ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId).Count() }).Where(x => x.ToBeClaimedCount + x.ToBeReviewedCount > 0).CountAsync() : 0, IQC_QCQuestionCount = isIQC ? await _trialRepository - .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + .Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) .Where(t => t.SubjectVisitList.SelectMany(c => c.QCChallengeList) - .Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() > 0).CountAsync() : 0, + .Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() > 0).CountAsync() : 0, @@ -1315,8 +1326,8 @@ namespace IRaCIS.Core.Application // .Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)).Count()>0).CountAsync() : 0, - await _trialReadingCriterionRepository.Where(t => t.IsSigned == true && t.IsConfirm == true && t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(c => c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect) + await _trialReadingCriterionRepository.Where(t => t.IsSigned == true && t.IsConfirm == true && t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(c => c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect) // 前序 不存在 未一致性核查未通过的 .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum)) //前序 不存在 未生成任务的访视 @@ -1328,8 +1339,8 @@ namespace IRaCIS.Core.Application : 0, - IR_MedicalReviewCount = isIR ? await _taskMedicalReviewRepository.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.Id) + IR_MedicalReviewCount = isIR ? await _taskMedicalReviewRepository.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.UserRoleId) .GroupBy(t => new { t.TrialId, t.VisitTask.TrialReadingCriterionId }) .Where(g => g.Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.MIM && u.AuditState == MedicalReviewAuditState.Auditing).Count() > 0).CountAsync() : 0, @@ -1339,8 +1350,8 @@ namespace IRaCIS.Core.Application #region MIM MIM_MedicalReviewCount = isMIM ? await _taskMedicalReviewRepository - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + .Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .GroupBy(t => new { t.TrialId, t.VisitTask.TrialReadingCriterionId }) .Select(g => new { @@ -1379,9 +1390,12 @@ namespace IRaCIS.Core.Application .WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code)) .WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName)) - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, + t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.IsDeleted == false + && t.TrialUserRoleList.Any(t => t.UserId == _userInfo.UserRoleId && t.IsDeleted == false)) + && t.IsDeleted == false) .WhereIf(inQuery.CriterionType != null, o => o.TrialReadingCriterionList.Any(t => t.CriterionType == inQuery.CriterionType && t.IsSigned && t.IsConfirm)) - .WhereIf(!string.IsNullOrEmpty(inQuery.PM_EMail), o => o.TrialUserList.Any(t => t.User.EMail.Contains(inQuery.PM_EMail) && (t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM))) + .WhereIf(!string.IsNullOrEmpty(inQuery.PM_EMail), o => o.TrialIdentityUserList.Any(t => t.IdentityUser.EMail.Contains(inQuery.PM_EMail))) .Select(t => new TrialToBeDoneDto() { TrialId = t.Id, @@ -1392,7 +1406,7 @@ namespace IRaCIS.Core.Application Sponsor = _userInfo.IsEn_Us ? t.Sponsor.SponsorName : t.Sponsor.SponsorNameCN, TrialStatusStr = t.TrialStatusStr, - ExpetiedTaskCount = isPM ? t.VisitTaskList.Where(t => t.IsUrgent).Count() : 0, + ExpetiedTaskCount = isPM ? t.VisitTaskList.Where(t => t.IsUrgent && t.IsAnalysisCreate==false && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)).Count() : 0, ReReadingApprovalCount = isPM ? t.VisitTaskReReadingList.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed).Count() : 0, @@ -1406,49 +1420,49 @@ namespace IRaCIS.Core.Application SPM_ReviewerSelectApprovalCount = isSPMOrCPM ? t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count() : 0, - MIM_UrgentCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + MIM_UrgentCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .Where(u => u.VisitTask.IsUrgent && u.AuditState != MedicalReviewAuditState.HaveSigned).Count() : 0, - MIM_PendingResponseCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + MIM_PendingResponseCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IndependentReviewer && u.AuditState == MedicalReviewAuditState.Auditing).Count() : 0, - MIM_PendingReviewCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) + MIM_PendingReviewCount = isMIM ? t.TaskMedicalReviewList.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId) .Where(u => u.AuditState != MedicalReviewAuditState.HaveSigned && u.LatestReplyUser.UserTypeEnum != UserTypeEnum.IndependentReviewer).Count() : 0, - CRC_UrgentCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id) && t.IsUrgent).Count() : 0, + CRC_UrgentCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId) && t.IsUrgent).Count() : 0, - CRC_CheckQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)) + CRC_CheckQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)) .Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count() : 0, - CRC_QCQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id)).SelectMany(c => c.QCChallengeList) + CRC_QCQuestionCount = isCRC ? t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).SelectMany(c => c.QCChallengeList) .Where(u => u.IsClosed == false && (u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC || u.LatestReplyUserId == null)).Count() : 0, //待审核 审核中 加急的数量 - IQC_UrgentCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && t.QCProcessEnum != TrialQCProcess.NotAudit && t.IsUrgent).Count() : 0, + IQC_UrgentCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && t.QCProcessEnum != TrialQCProcess.NotAudit && t.IsUrgent).Count() : 0, //审核未完成 - IQC_AuditToBeDealedCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && t.QCProcessEnum != TrialQCProcess.NotAudit).Count() : 0, + IQC_AuditToBeDealedCount = isIQC ? t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.UserRoleId && t.QCProcessEnum != TrialQCProcess.NotAudit).Count() : 0, //质疑待处理 IQC_QuestionToBeDealedCount = isIQC ? t.SubjectVisitList.SelectMany(c => c.QCChallengeList) - .Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0, + .Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0, //待领取 IQC_ToBeClaimedCount = isIQC ? t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed) - .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count() : 0, + .Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count() : 0, IR_ReadingCriterionList = isIR ? t.TrialReadingCriterionList.Where(t => t.IsConfirm && t.IsSigned).OrderBy(t => t.CriterionName).Select(t => t.CriterionName).ToList() : null, - IR_PMEmailList = isIR ? t.TrialUserList.Where(t => t.User.UserTypeEnum == UserTypeEnum.ProjectManager || t.User.UserTypeEnum == UserTypeEnum.APM).OrderBy(t => t.User.EMail).Select(t => t.User.EMail).ToList() : null, + IR_PMEmailList = isIR ? t.TrialUserRoleList.Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.ProjectManager || t.UserRole.UserTypeEnum == UserTypeEnum.APM).OrderBy(t => t.UserRole.IdentityUser.EMail).Select(t => t.UserRole.IdentityUser.EMail).ToList() : null, - IR_TotalReadCount = isIR ? t.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() : 0, + IR_TotalReadCount = isIR ? t.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() : 0, IR_UnReadCount = isIR ? t.VisitTaskList - .Where(c => c.DoctorUserId == _userInfo.Id && c.ReadingTaskState != ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterion.IsSigned) + .Where(c => c.DoctorUserId == _userInfo.UserRoleId && c.ReadingTaskState != ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterion.IsSigned) // 前序 不存在 未一致性核查未通过的 .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum)) //前序 不存在 未生成任务的访视 @@ -1476,54 +1490,54 @@ namespace IRaCIS.Core.Application [HttpPost] public async Task>> GetTrialUserToBeDoneList(TrialUserToBeDoneQuery inQuery, - [FromServices] IRepository _trialUserRepository) + [FromServices] IRepository _trialUserRoleRepository) { - var query = _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId) + var query = _trialUserRoleRepository.Where(t => t.TrialId == inQuery.TrialId) .Select(t => new TrialUserToBeDoneDto() { - UserName = t.User.UserName, - FullName = t.User.FullName, - UserType = t.User.UserTypeEnum, + UserName = t.UserRole.IdentityUser.UserName, + FullName = t.UserRole.FullName, + UserType = t.UserRole.UserTypeEnum, //SPM 阅片人筛选 ReviewerSelect_SPM_ToBeApprovalCount = - (t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM) ? t.Trial.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count() : 0, //PM 阅片人确认 ReviewerSelect_PM_ToBeConfirmCount = - (t.User.UserTypeEnum == UserTypeEnum.APM || t.User.UserTypeEnum == UserTypeEnum.ProjectManager) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.APM || t.UserRole.UserTypeEnum == UserTypeEnum.ProjectManager) ? t.Trial.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.InviteIntoGroup).Count() : 0, //CRC 重传 --区分人 ImageUpload_CRC_ToBeReUploadCount = - (t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.User.UserTypeEnum == UserTypeEnum.CRA) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.UserRole.UserTypeEnum == UserTypeEnum.CRA) ? t.Trial.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == t.UserId)) .Where(u => u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading).Count() : 0, //CRC加急待提交 需确认?--区分人 ImageUpload_CRC_ToBeSubmitCount = - (t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.User.UserTypeEnum == UserTypeEnum.CRA) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.UserRole.UserTypeEnum == UserTypeEnum.CRA) ? t.Trial.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == t.UserId)) .Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count() : 0, // QC IQC 待领取 QC_IQC_ToBeClaimedCount = - (t.User.UserTypeEnum == UserTypeEnum.IQC) ? - t.Trial.SubjectVisitList.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.Id && u.ReviewAuditUserId == null))).Count() : 0, + (t.UserRole.UserTypeEnum == UserTypeEnum.IQC) ? + t.Trial.SubjectVisitList.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count() : 0, // CRC 质疑待回复 --区分人 QC_CRC_ToBeDealedCount = - (t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.User.UserTypeEnum == UserTypeEnum.CRA) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.UserRole.UserTypeEnum == UserTypeEnum.CRA) ? t.Trial.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == t.UserId)) .SelectMany(c => c.QCChallengeList).Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC).Count() : 0, //IQC 质疑待处理 --区分人 QC_IQC_ToBeDealedCount = - (t.User.UserTypeEnum == UserTypeEnum.IQC) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.IQC) ? t.Trial.SubjectVisitList.SelectMany(c => c.QCChallengeList) .Where(u => u.CreateUserId == t.UserId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0, @@ -1531,33 +1545,33 @@ namespace IRaCIS.Core.Application // IQC 待审核 QC_IQC_ToBeReviewedCount = - (t.User.UserTypeEnum == UserTypeEnum.IQC) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.IQC) ? t.Trial.SubjectVisitList.Where(u => u.CurrentActionUserId == t.UserId).Count() : 0, //PM 核查待处理 Check_PM_ToBeDealedCount = - (t.User.UserTypeEnum == UserTypeEnum.APM || t.User.UserTypeEnum == UserTypeEnum.ProjectManager) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.APM || t.UserRole.UserTypeEnum == UserTypeEnum.ProjectManager) ? t.Trial.SubjectVisitList.Where(u => u.CheckState == CheckStateEnum.ToCheck).Count() : 0, //PM 质疑待处理 Check_PM_ToBeReplyedCount = - (t.User.UserTypeEnum == UserTypeEnum.APM || t.User.UserTypeEnum == UserTypeEnum.ProjectManager) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.APM || t.UserRole.UserTypeEnum == UserTypeEnum.ProjectManager) ? t.Trial.SubjectVisitList.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeDialogList.OrderByDescending(t => t.CreateTime).First().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() : 0, // CRC 核查 质疑待处理 --区分人 Check_CRC_ToBeDealedCount = - (t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.User.UserTypeEnum == UserTypeEnum.CRA) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.UserRole.UserTypeEnum == UserTypeEnum.CRA) ? t.Trial.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == t.UserId)) .Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count() : 0, //IR 未读 --区分人 Reading_IR_UnReadCount = - (t.User.UserTypeEnum == UserTypeEnum.IndependentReviewer) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.IndependentReviewer) ? t.Trial.VisitTaskList .Where(c => c.DoctorUserId == t.UserId && c.ReadingTaskState != ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect) // 前序 不存在 未一致性核查未通过的 @@ -1570,30 +1584,30 @@ namespace IRaCIS.Core.Application //SPM PM重阅审批 Reading_SPM_ToBeApprovalCount = - (t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM) ? t.Trial.VisitTaskReReadingList.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed).Count() : 0, //PM IR重阅审批 Reading_PM_ToBeApprovalCount = - (t.User.UserTypeEnum == UserTypeEnum.APM || t.User.UserTypeEnum == UserTypeEnum.ProjectManager) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.APM || t.UserRole.UserTypeEnum == UserTypeEnum.ProjectManager) ? t.Trial.VisitTaskReReadingList.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed).Count() : 0, //IR 医学审核 --区分人 Medical_IR_ToBeDealedCount = - (t.User.UserTypeEnum == UserTypeEnum.IndependentReviewer) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.IndependentReviewer) ? t.Trial.TaskMedicalReviewList .Where(c => c.IsClosedDialog == false && c.VisitTask.DoctorUserId == t.UserId && c.IsInvalid == false) .Where(u => u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM).Count() : 0, Medical_MIM_ToBeDealedCount = - (t.User.UserTypeEnum == UserTypeEnum.MIM) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.MIM) ? t.Trial.TaskMedicalReviewList .Where(t => t.IsClosedDialog == false) .Where(u => u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer).Count() : 0, Medical_MIM_ToBeReviewedCount = - (t.User.UserTypeEnum == UserTypeEnum.MIM) ? + (t.UserRole.UserTypeEnum == UserTypeEnum.MIM) ? t.Trial.TaskMedicalReviewList .Where(t => t.IsClosedDialog == false && t.IsInvalid == false) .Where(u => !u.IsInvalid && u.AuditState != MedicalReviewAuditState.HaveSigned).Count() : 0 diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index 274c10e2e..81d477125 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -802,7 +802,7 @@ namespace IRaCIS.Core.Application throw new BusinessValidationFailedException(_localizer["TrialConfig_InvalidParentQuestionId"]); } - if (await _trialRepository.AnyAsync(t => t.Id == signConfirmDTO.TrialId && t.QCQuestionConfirmedUserId != null && t.QCQuestionConfirmedUserId != _userInfo.Id)) + if (await _trialRepository.AnyAsync(t => t.Id == signConfirmDTO.TrialId && t.QCQuestionConfirmedUserId != null && t.QCQuestionConfirmedUserId != _userInfo.UserRoleId)) { //---影像质控审核问题已被其他人员确认,不允许再次确认。 throw new BusinessValidationFailedException(_localizer["TrialConfig_AuditQuestionConfirmed"]); @@ -872,7 +872,7 @@ namespace IRaCIS.Core.Application throw new BusinessValidationFailedException(_localizer["TrialConfig_InvalidParentQuestionId"]); } - if (await _trialRepository.AnyAsync(t => t.Id == signConfirmDTO.TrialId && t.QCQuestionConfirmedUserId != null && t.QCQuestionConfirmedUserId != _userInfo.Id)) + if (await _trialRepository.AnyAsync(t => t.Id == signConfirmDTO.TrialId && t.QCQuestionConfirmedUserId != null && t.QCQuestionConfirmedUserId != _userInfo.UserRoleId)) { //---影像质控审核问题已被其他人员确认,不允许再次确认。 throw new BusinessValidationFailedException(_localizer["TrialConfig_AuditQuestionConfirmed"]); @@ -882,7 +882,7 @@ namespace IRaCIS.Core.Application { IsConfirm = true }); - await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.Id, IsQCQuestionConfirmed = true }); + await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.UserRoleId, IsQCQuestionConfirmed = true }); await _trialRepository.SaveChangesAsync(); } @@ -1257,6 +1257,15 @@ namespace IRaCIS.Core.Application .FirstOrDefaultAsync().IfNullThrowException(); } + [TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")] + public async Task ConfigTrialSPMInfo(TrialSPMConfigCommand trialConfig) + { + var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.Id)).IfNullThrowException(); + + _mapper.Map(trialConfig, trialInfo); + + return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync()); + } /// /// 配置项目任务信息 @@ -1353,12 +1362,14 @@ namespace IRaCIS.Core.Application [AllowAnonymous] public async Task GetTrialExtralConfig(Guid trialId) { - var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialObjectNameList }).FirstOrDefault(); + var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialObjectNameList, t.CollectImagesEnum }).FirstOrDefault(); var extralConfig = JsonConvert.DeserializeObject(extralObj?.TrialExtraConfigJsonStr) ?? new TrialExtraConfig(); extralConfig.TrialObjectNameList = extralObj.TrialObjectNameList; + extralConfig.CollectImagesEnum = extralObj.CollectImagesEnum; + return extralConfig; } /// diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs index d1e8305e6..31d253d81 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs @@ -13,6 +13,10 @@ using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infrastructure; using Medallion.Threading; using Microsoft.AspNetCore.Mvc; +using DocumentFormat.OpenXml.Spreadsheet; +using IRaCIS.Core.Domain.Models; +using IRaCIS.Application.Contracts; +using MassTransit; namespace IRaCIS.Core.Application.Service { @@ -21,8 +25,10 @@ namespace IRaCIS.Core.Application.Service /// [ApiExplorerSettings(GroupName = "Trial")] public class TrialExternalUserService(IRepository _trialExternalUseRepository, - IRepository _userRepository, - IRepository _trialUserRepository, + IRepository _userRoleRepository, + IRepository _identityUserRepository, + IRepository _trialUserRoleRepository, + IRepository _trialIdentityUserRepository, IRepository _trialRepository, IRepository _userTypeRepository, IMailVerificationService _mailVerificationService, @@ -54,7 +60,7 @@ namespace IRaCIS.Core.Application.Service /// //[Authorize(Policy = IRaCISPolicy.PM_APM)] [UnitOfWork] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task AddOrUpdateTrialExternalUser(TrialExternalUserAddAndSendEmail addOrEditTrialExternalUser) { @@ -64,14 +70,14 @@ namespace IRaCIS.Core.Application.Service using (await @lock.AcquireAsync()) { - var existSysUser = await _userRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId); + var existSysUser = await _identityUserRepository.Where(t => t.EMail == addOrEditTrialExternalUser.Email, true).Include(t => t.UserRoleList).FirstOrDefaultAsync(); if (existSysUser != null) { if (existSysUser.LastName != addOrEditTrialExternalUser.LastName || existSysUser.FirstName != addOrEditTrialExternalUser.FirstName) { //$"该用户在系统中的用户名为:{existSysUser.LastName + " / " + existSysUser.FirstName} 电话:{existSysUser.Phone},与填写信息存在不一致项, 请将界面信息修改为与系统一致,再进行保存", - return ResponseOutput.NotOk(_localizer["TrialExternalUser_Inconsistency", existSysUser.LastName + " / " + existSysUser.FirstName, existSysUser.Phone], new { existSysUser.LastName, existSysUser.FirstName, existSysUser.Phone, existSysUser.IsZhiZhun, existSysUser.IsTestUser }, ApiResponseCodeEnum.NeedTips); + return ResponseOutput.NotOk(_localizer["TrialExternalUser_Inconsistency", existSysUser.LastName + " / " + existSysUser.FirstName, existSysUser.Phone], new { existSysUser.LastName, existSysUser.FirstName, existSysUser.Phone, existSysUser.OrganizationName, existSysUser.IsZhiZhun, existSysUser.IsTestUser }, ApiResponseCodeEnum.NeedTips); } } @@ -86,67 +92,24 @@ namespace IRaCIS.Core.Application.Service return ResponseOutput.NotOk(_localizer["TrialExternalUser_EmailTypeDuplicate"]); } - - var addEntity = _mapper.Map(addOrEditTrialExternalUser); await _trialExternalUseRepository.AddAsync(addEntity); - - var existUser = await _userRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId); - var trialType = await _trialRepository.Where(t => t.Id == addOrEditTrialExternalUser.TrialId).Select(t => t.TrialType).FirstOrDefaultAsync(); - - if (existUser != null) + if (existSysUser != null) { addEntity.IsSystemUser = true; - addEntity.SystemUserId = existUser.Id; - + addEntity.SystemUserId = existSysUser.Id; } - else - { - //生成账户 并插入 - - var generateUser = _mapper.Map(addOrEditTrialExternalUser); - - if (trialType == TrialType.NoneOfficial) - { - generateUser.IsTestUser = true; - } - - // 外部人员生成账号 都是外部的 - generateUser.IsZhiZhun = false; - - generateUser.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1; - - - generateUser.UserCode = AppSettings.GetCodeStr(generateUser.Code, nameof(User)); - - generateUser.UserName = generateUser.UserCode; - - generateUser.UserTypeEnum = _userTypeRepository.Where(t => t.Id == generateUser.UserTypeId).Select(t => t.UserTypeEnum).First(); - - generateUser.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10)); - - generateUser.Status = UserStateEnum.Disable; - - var newAddUser = await _userRepository.AddAsync(generateUser); - - - addEntity.IsSystemUser = false; - addEntity.SystemUserId = newAddUser.Id; - - - existUser = newAddUser; - - } + var trialType = await _trialRepository.Where(t => t.Id == addOrEditTrialExternalUser.TrialId).Select(t => t.TrialType).FirstOrDefaultAsync(); #region 验证用户 能否加入 if (trialType == TrialType.OfficialTrial || trialType == TrialType.Training) { - if (existUser.IsTestUser) + if (existSysUser != null && existSysUser.IsTestUser) { //---正式类型 、培训类型的项目 不允许加入测试用户 throw new BusinessValidationFailedException(_localizer["TrialExternalUser_TestUserNotAllowed"]); @@ -157,7 +120,7 @@ namespace IRaCIS.Core.Application.Service if (trialType == TrialType.NoneOfficial) { - if (existUser.IsTestUser == false) + if (existSysUser != null && existSysUser.IsTestUser == false) { //---测试项目 不允许加入正式用户 throw new BusinessValidationFailedException(_localizer["TrialExternalUser_FormalUserNotAllowed"]); @@ -185,7 +148,8 @@ namespace IRaCIS.Core.Application.Service Id = addEntity.Id, Email=addEntity.Email, IsSystemUser=addEntity.IsSystemUser, - SystemUserId=addEntity.SystemUserId + //SystemUserId=addEntity.SystemUserId, + UserTypeId=addOrEditTrialExternalUser.UserTypeId } } }); @@ -213,19 +177,14 @@ namespace IRaCIS.Core.Application.Service { var trialExternalUser = await _trialExternalUseRepository.FirstOrDefaultAsync(t => t.Id == trialExternalUserId); - if (await _trialUserRepository.AnyAsync(t => t.TrialId == trialExternalUser.TrialId && t.UserId == trialExternalUser.SystemUserId)) + if (await _trialIdentityUserRepository.AnyAsync(t => t.TrialId == trialExternalUser.TrialId && t.IdentityUserId == trialExternalUser.SystemUserId)) { //---当前用户已参与到项目,不允许删除 return ResponseOutput.NotOk(_localizer["TrialExternalUser_CannotDelete"]); } - var success = await _trialExternalUseRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialExternalUserId); - if (isSystemUser == false) - { - await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == systemUserId); - } return ResponseOutput.Result(success); } @@ -234,45 +193,208 @@ namespace IRaCIS.Core.Application.Service //New 省掉邀请流程 [HttpPost] //[Authorize(Policy = IRaCISPolicy.PM_APM)] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] [UnitOfWork] public async Task SendExternalUserJoinEmail(TrialExternalUserSendEmail sendEmail) { var trialId = sendEmail.TrialId; - foreach (var userInfo in sendEmail.SendUsers) + var trialType = await _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialType).FirstOrDefaultAsync(); + + foreach (var item in sendEmail.SendUsers.GroupBy(t => t.Email)) { - var userId = userInfo.SystemUserId; + + var userEmail = item.Key; + + var userTypeIdList = item.Select(t => t.UserTypeId).ToList(); + + var itemFirst = item.FirstOrDefault(); + + var externalIdList = item.Select(t => t.Id).ToList(); + //var identityUserId = item.Key; + var existSysUser = await _identityUserRepository.Where(t => t.EMail == userEmail, true).Include(t => t.UserRoleList).FirstOrDefaultAsync(); - //判断TrialUser中是否存在 不存在就插入 注意退出了,也不能再加进来 - if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true)) + if (existSysUser != null) { - await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now }); + //账号状态设置为启用 + existSysUser.Status = UserStateEnum.Enable; - await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable }); + foreach (var userTypeId in userTypeIdList) + { + var findRole = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == userTypeId); - await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == userInfo.Id, u => new TrialExternalUser() { IsJoin = true }); + if (findRole != null) + { + //存在该角色,设置为启用 + findRole.IsUserRoleDisabled = false; + } + else + { + //不存在该角色,那么就添加 + var addRole = _mapper.Map(existSysUser); + addRole.UserTypeEnum = _userTypeRepository.Where(t => t.Id == userTypeId).Select(t => t.UserTypeEnum).First(); + addRole.UserTypeId = userTypeId; + addRole.IsUserRoleDisabled = false; + existSysUser.UserRoleList.Add(addRole); + } + } + + //防止已经生成账号的信息与外部人员信息不一致 在此默认批量更一下 + + await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => externalIdList.Contains(t.Id), u => new TrialExternalUser() + { + FirstName = existSysUser.FirstName, + LastName = existSysUser.LastName, + Phone = existSysUser.Phone, + OrganizationName = existSysUser.OrganizationName + }); + } + else + { + + //生成账户 并插入 + var externalUser = await _trialExternalUseRepository.FirstOrDefaultAsync(t => t.Id == itemFirst.Id); + var generateUser = _mapper.Map(externalUser); + + if (trialType == TrialType.NoneOfficial) + { + generateUser.IsTestUser = true; + } + + // 外部人员生成账号 都是外部的 + generateUser.IsZhiZhun = false; + + generateUser.Code = _identityUserRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1; + + generateUser.UserCode = AppSettings.GetCodeStr(generateUser.Code, nameof(IdentityUser)); + + //generateUser.UserName = generateUser.UserCode; - await _userRepository.SaveChangesAsync(); + generateUser.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10)); + + generateUser.Status = UserStateEnum.Enable; + + generateUser.UserRoleList = new List() { }; + + foreach (var userTypeId in userTypeIdList) + { + var addRole = _mapper.Map(generateUser); + + addRole.Id = NewId.NextSequentialGuid(); + addRole.UserTypeEnum = _userTypeRepository.Where(t => t.Id == userTypeId).Select(t => t.UserTypeEnum).First(); + addRole.UserTypeId = userTypeId; + + generateUser.UserRoleList.Add(addRole); + } + + var newAddUser = await _identityUserRepository.AddAsync(generateUser); + + + + existSysUser = newAddUser; + + await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => externalIdList.Contains(t.Id), u => new TrialExternalUser() + { + IsSystemUser = false, + SystemUserId = newAddUser.Id, + FirstName = existSysUser.FirstName, + LastName = existSysUser.LastName, + OrganizationName = existSysUser.OrganizationName, + Phone = existSysUser.Phone, + }); + } - await _mailVerificationService.ExternalUserJoinEmail(trialId, userId, sendEmail.BaseUrl, sendEmail.RouteUrl); + await _identityUserRepository.SaveChangesAsync(); + + + var identityUserId = existSysUser.Id; + + + var userTypeList = await _identityUserRepository.Where(t => t.Id == identityUserId).SelectMany(t => t.UserRoleList).Select(t => new { t.UserTypeId, t.UserTypeRole.UserTypeName, t.UserTypeRole.UserTypeShortName }).ToListAsync(); + + var userHaveUserTypeIdList = userTypeList.Select(t => t.UserTypeId).ToList(); + + if (userTypeIdList.Except(userHaveUserTypeIdList).Any()) + { + return ResponseOutput.NotOk("database dirty data "); + } + + var findTrialUser = await _trialIdentityUserRepository.Where(t => t.TrialId == trialId && t.IdentityUserId == identityUserId, true, true).Include(t => t.TrialUserRoleList).ThenInclude(t => t.UserRole).FirstOrDefaultAsync(); + + if (findTrialUser == null) + { + //没有项目参与人员 + findTrialUser = await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser() + { + IdentityUserId = identityUserId, + TrialId = trialId, + JoinTime = DateTime.Now, + + TrialUserRoleList = userTypeIdList.Select(u => new TrialUserRole() + { + TrialId = trialId, + UserId = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == u).Id, + + }).ToList() + }); + } + else + { + //有该人员 + + if (findTrialUser.IsDeleted == true) + { + findTrialUser.IsDeleted = false; + findTrialUser.DeletedTime = null; + findTrialUser.RemoveTime = null; + findTrialUser.JoinTime = DateTime.Now; + } + + //是否有该角色 + + foreach (var userTypeId in userTypeIdList) + { + var findTrialUserRole = findTrialUser.TrialUserRoleList.Where(t => t.UserRole?.UserTypeId == userTypeId).FirstOrDefault(); + + if (findTrialUserRole == null) + { + //添加该角色 + findTrialUser.TrialUserRoleList.Add(new TrialUserRole() { TrialUserId = findTrialUser.Id, TrialId = trialId, UserId = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == userTypeId).Id }); + } + else + { + //如果禁用,那么启用 + if (findTrialUserRole.IsDeleted == true) + { + findTrialUserRole.IsDeleted = false; + findTrialUserRole.DeletedTime = null; + } + + } + + } + } + + await _trialIdentityUserRepository.SaveChangesAsync(); + + + var usertyps = string.Join(',', userTypeList.Where(t => userTypeIdList.Contains(t.UserTypeId)).Select(t => t.UserTypeName)); + + await _mailVerificationService.ExternalUserJoinEmail(trialId, identityUserId, usertyps, sendEmail.BaseUrl, sendEmail.RouteUrl); + + await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => externalIdList.Contains(t.Id), u => new TrialExternalUser() { IsJoin = true }); + } return ResponseOutput.Ok(); } - - - - - - } } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs index 4d75837ad..b6e0a3afd 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs @@ -1,16 +1,21 @@ -using IRaCIS.Application.Contracts; +using FellowOakDicom; +using IRaCIS.Application.Contracts; using IRaCIS.Application.Interfaces; using IRaCIS.Core.Application.Contracts.DTO; using IRaCIS.Core.Application.Filter; +using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; +using MassTransit.Serialization; using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore.Storage.Json; +using System; namespace IRaCIS.Core.Application.Service { [ApiExplorerSettings(GroupName = "Trial")] - public class TrialMaintenanceService(IRepository _trialUseRepository, - IRepository _userRepository, - IRepository _trialSiteUserRepository, + public class TrialMaintenanceService(IRepository _trialUseRoleRepository, IRepository _trialIdentityUserRepository, + IRepository _userRoleRepository, + IRepository _trialSiteUserRoleRepository, IRepository _subjectVisitRepository, IRepository _trialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialMaintenanceService { @@ -18,30 +23,228 @@ namespace IRaCIS.Core.Application.Service [HttpGet] public async Task> GetTrialUserList(Guid trialId) { - return await _trialUseRepository.Where(t => t.TrialId == trialId, ignoreQueryFilters: true) - .Select(t => new TrialUserBasicInfo() { FullName = t.User.FullName, UserId = t.UserId, UserTypeId = t.User.UserTypeId, UserName = t.User.UserName }) + return await _trialUseRoleRepository.Where(t => t.TrialId == trialId, ignoreQueryFilters: true) + .Select(t => new TrialUserBasicInfo() { FullName = t.UserRole.FullName, UserId = t.UserId, UserTypeId = t.UserRole.UserTypeId, UserName = t.UserRole.IdentityUser.UserName }) .ToListAsync(); } + #region 多账户调整已修改 /// /// Setting页面 获取项目参与人员列表 /// /// /// [HttpPost] - public async Task> GetMaintenanceUserList(TrialMaintenanceQuery inQuery) + public async Task> GetMaintenanceUserList(TrialMaintenanceQuery inQuery) + { + var query = _trialIdentityUserRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() + .WhereIf(inQuery.UserTypeId != null, t => t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == inQuery.UserTypeId)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserName), t => t.IdentityUser.UserName.Contains(inQuery.UserName)) + + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.IdentityUser.OrganizationName.Contains(inQuery.OrganizationName)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => (t.IdentityUser.FullName).Contains(inQuery.UserRealName)) + .Select(t => new TrialIdentityUserDto() + { + Id = t.Id, + TrialId = t.TrialId, + IsDeleted = t.IsDeleted, + CreateTime = t.CreateTime, + EMail = t.IdentityUser.EMail, + FullName = t.IdentityUser.FullName, + IdentityUserId = t.IdentityUserId, + JoinTime = t.JoinTime, + OrganizationName = t.IdentityUser.OrganizationName, + Phone = t.IdentityUser.Phone, + UpdateTime = t.UpdateTime, + UserName = t.IdentityUser.UserName, + RemoveTime = t.RemoveTime, + Status = t.IdentityUser.Status, + TrialUserRoleList = t.TrialUserRoleList.Select(ur => new TrialIdentityUserRoleDto() + { + Id = ur.Id, + UserTypeShortName = ur.UserRole.UserTypeRole.UserTypeShortName, + IsUserRoleDisabled = ur.UserRole.IsUserRoleDisabled, + IsDeleted = ur.IsDeleted, + CreateTime = ur.CreateTime, + UserTypeEnum = ur.UserRole.UserTypeEnum, + UpdateTime = ur.UpdateTime + }).ToList() + }); + + return await query.ToPagedListAsync(inQuery, nameof(TrialIdentityUserDto.UpdateTime)); + } + + [TrialGlobalLimit("AfterStopCannNotOpt")] + //[Authorize(Policy = IRaCISPolicy.PM_APM)] + [HttpPut] + public async Task UpdateTrialUser(UpdateTrialUserCommand updateTrialUserCommand) + { + var trialUser = await _trialIdentityUserRepository.Where(t => t.Id == updateTrialUserCommand.Id, true, true).FirstOrDefaultAsync(); + + if (trialUser == null) return Null404NotFound(trialUser); + + + if (updateTrialUserCommand.IsDeleted) + { + if (await _trialSiteUserRoleRepository.AnyAsync(t => t.UserRole.IdentityUserId == trialUser.IdentityUserId && t.TrialId == trialUser.TrialId)) + { + // ----人员已加入现场维护 + return ResponseOutput.NotOk(_localizer["TrialMaint_PersonnelJoined"]); + } + + var findQC = await _trialUseRoleRepository.FirstOrDefaultAsync(t => t.UserRole.IdentityUserId == trialUser.IdentityUserId && t.UserRole.UserTypeEnum == UserTypeEnum.IQC); + + if (findQC != null) + { + await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.CurrentActionUserId == findQC.Id && t.TrialId == trialUser.TrialId && t.IsTake, u => new SubjectVisit() { CurrentActionUserId = null, CurrentActionUserExpireTime = null, IsTake = false }); + } + + } + + _mapper.Map(updateTrialUserCommand, trialUser); + + await _trialUseRoleRepository.SaveChangesAsync(); + + return ResponseOutput.Ok(); + + + } + + + [HttpPut] + public async Task UpdateTrialUserRole(UpdateTrialUserRoleCommand updateCommand) { - var query = _trialUseRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() - .WhereIf(inQuery.UserTypeId != null, t => t.User.UserTypeId == inQuery.UserTypeId) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserName), t => t.User.UserName.Contains(inQuery.UserName)) + DateTime? deleteTime = updateCommand.IsDeleted ? DateTime.Now : null; - .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.User.OrganizationName.Contains(inQuery.OrganizationName)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => (t.User.FullName).Contains(inQuery.UserRealName)) - .ProjectTo(_mapper.ConfigurationProvider); + await _trialUseRoleRepository.UpdatePartialFromQueryAsync(t => updateCommand.IdList.Contains(t.Id), u => new TrialUserRole() { IsDeleted = updateCommand.IsDeleted, DeletedTime = deleteTime }, true, true); - return await query.ToPagedListAsync(inQuery, nameof(TrialMaintenanceDTO.UpdateTime)); + return ResponseOutput.Ok(); + } + + /// + /// 项目人员 邮件过期 重新发送邀请邮件 + /// + /// + /// + [HttpPost] + public async Task TrialUserSendJoinEmail(TrialUserSendJoinEmailCommand incommand, [FromServices] IMailVerificationService _mailVerificationService) + { + + var userTypeList = _trialIdentityUserRepository.Where(t => t.TrialId == incommand.TrialId && t.IdentityUserId == incommand.IdentityUserId).SelectMany(t => t.TrialUserRoleList).Select(t => t.UserRole.UserTypeRole.UserTypeName).ToList(); + + var usertyps = string.Join(',', userTypeList); + + await _mailVerificationService.ExternalUserJoinEmail(incommand.TrialId, incommand.IdentityUserId, usertyps, incommand.BaseUrl, incommand.RouteUrl); + + return ResponseOutput.Ok(); + } + + + + /// Setting页面 项目参与人员勾选列表 + [HttpPost] + public async Task> GetTrialUserScreeningList(TrialUserQuery inQuery) + { + var trialType = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.TrialType).FirstOrDefault(); + + var userTypeEnums = new List() { UserTypeEnum.ClinicalResearchCoordinator, UserTypeEnum.CRA, UserTypeEnum.IQC, UserTypeEnum.APM, UserTypeEnum.MIM, UserTypeEnum.QA, UserTypeEnum.MW, UserTypeEnum.MC }; + + //if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin) + { + userTypeEnums.Add(UserTypeEnum.ProjectManager); + } + + + //之前已经选择的用户 不放在列表中,现在又要改回去 废弃 + var query = _userRoleRepository.Where(t => t.UserTypeEnum != UserTypeEnum.SuperAdmin && t.IdentityUser.Status == UserStateEnum.Enable).IgnoreQueryFilters() + + //正式或者培训的项目 不能允许测试用户(必须正式用户) 同时必须是内部的用户 + .WhereIf(trialType == TrialType.OfficialTrial || trialType == TrialType.Training, t => t.IdentityUser.IsTestUser == false && t.IdentityUser.IsZhiZhun) + + //测试项目 可以加入 测试用户 或者内部正式用户 + .WhereIf(trialType == TrialType.NoneOfficial, t => t.IdentityUser.IsTestUser == true || (t.IdentityUser.IsTestUser == false && t.IdentityUser.IsZhiZhun)) + .Where(t => userTypeEnums.Contains(t.UserTypeEnum)) + .WhereIf(inQuery.UserTypeEnum != null, t => t.UserTypeEnum == inQuery.UserTypeEnum) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => t.IdentityUser.FullName.Contains(inQuery.UserRealName)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserName), t => t.IdentityUser.UserName.Contains(inQuery.UserName)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.IdentityUser.OrganizationName.Contains(inQuery.OrganizationName)) + .WhereIf(inQuery.IsUserRoleDisabled != null, t => t.IsUserRoleDisabled == inQuery.IsUserRoleDisabled) + .Select(t => new TrialUserRoleScreeningDto() + { + Id = t.Id, + TrialId = inQuery.TrialId, + IdentityUserId = t.IdentityUserId, + EMail = t.IdentityUser.EMail, + FullName = t.IdentityUser.FullName, + OrganizationName = t.IdentityUser.OrganizationName, + Phone = t.IdentityUser.Phone, + UserName = t.IdentityUser.UserName, + UserTypeShortName = t.UserTypeRole.UserTypeShortName, + IsSelect = t.UserRoleTrials.Any(t => t.TrialId == inQuery.TrialId), + }); + + + return await query.ToPagedListAsync(inQuery, nameof(TrialUserRoleScreeningDto.EMail)); + + } + + #endregion + + + /// + /// Setting页面 批量添加项目参与人员 + /// + /// + /// + //[TrialAudit(AuditType.TrialAudit, AuditOptType.AddTrialStaff)] + [HttpPost] + [TrialGlobalLimit("AfterStopCannNotOpt")] + //[Authorize(Policy = IRaCISPolicy.PM_APM)] + public async Task AddTrialUsers(TrialUserAddCommand[] userTrialCommands) + { + foreach (var item in userTrialCommands.GroupBy(t => t.IdentityUserId)) + { + var currentUserRoleList = item.ToList(); + + var first = currentUserRoleList.FirstOrDefault(); + + var findTrialuser = await _trialIdentityUserRepository.Where(t => t.TrialId == first.TrialId && t.IdentityUserId == item.Key, true, true).Include(t => t.TrialUserRoleList).FirstOrDefaultAsync(); + + if (findTrialuser == null) + { + var currentUser = new TrialIdentityUser() + { + TrialId = first.TrialId, + IdentityUserId = item.Key, + JoinTime = DateTime.Now, + TrialUserRoleList = currentUserRoleList.Select(t => new TrialUserRole() { UserId = t.UserId, TrialId = t.TrialId }).ToList() + }; + + + await _trialIdentityUserRepository.AddAsync(currentUser); + } + else + { + if (findTrialuser.IsDeleted = true) + { + findTrialuser.IsDeleted = false; + findTrialuser.DeletedTime = null; + findTrialuser.JoinTime = DateTime.Now; + findTrialuser.RemoveTime = null; + } + + findTrialuser.TrialUserRoleList.AddRange(currentUserRoleList.Select(t => new TrialUserRole() { UserId = t.UserId, TrialId = t.TrialId, TrialUserId = findTrialuser.Id }).ToList()); + } + + + + var success = await _trialIdentityUserRepository.SaveChangesAsync(); + + } + + return ResponseOutput.Ok(); } @@ -55,11 +258,11 @@ namespace IRaCIS.Core.Application.Service { // 最开始过滤site已经选择的用户 现在又改回去。。。 - var query = _trialUseRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() - .Where(t => t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.User.UserTypeEnum == UserTypeEnum.CRA) - .WhereIf(inQuery.UserTypeId != null, t => t.User.UserTypeId == inQuery.UserTypeId) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => (t.User.FullName).Contains(inQuery.UserRealName)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.User.OrganizationName.Contains(inQuery.OrganizationName)) + var query = _trialUseRoleRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() + .Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.UserRole.UserTypeEnum == UserTypeEnum.CRA) + .WhereIf(inQuery.UserTypeId != null, t => t.UserRole.UserTypeId == inQuery.UserTypeId) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => (t.UserRole.IdentityUser.FullName).Contains(inQuery.UserRealName)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.UserRole.IdentityUser.OrganizationName.Contains(inQuery.OrganizationName)) .ProjectTo(_mapper.ConfigurationProvider, new { trialSiteId = inQuery.TrialSiteId }); return await query.ToPagedListAsync(inQuery); @@ -67,141 +270,6 @@ namespace IRaCIS.Core.Application.Service } - /// Setting页面 项目参与人员勾选列表 - [HttpPost] - public async Task> GetTrialUserScreeningList(TrialUserQuery inQuery) - { - var trialType = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.TrialType).FirstOrDefault(); - - var userTypeEnums = new List() { UserTypeEnum.ClinicalResearchCoordinator, UserTypeEnum.CRA, UserTypeEnum.IQC, UserTypeEnum.APM, UserTypeEnum.MIM, UserTypeEnum.QA, UserTypeEnum.MW, UserTypeEnum.MC }; - - //if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin) - { - userTypeEnums.Add(UserTypeEnum.ProjectManager); - } - - - //之前已经选择的用户 不放在列表中,现在又要改回去 废弃 - var query = _userRepository.Where(t => t.UserTypeEnum != UserTypeEnum.SuperAdmin) - - //正式或者培训的项目 不能允许测试用户(必须正式用户) 同时必须是内部的用户 - .WhereIf(trialType == TrialType.OfficialTrial || trialType == TrialType.Training, t => t.IsTestUser == false && t.IsZhiZhun) - - //测试项目 可以加入 测试用户 或者内部正式用户 - .WhereIf(trialType == TrialType.NoneOfficial, t => t.IsTestUser == true || (t.IsTestUser == false && t.IsZhiZhun)) - - - .Where(t => userTypeEnums.Contains(t.UserTypeEnum)) - - - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => (t.FullName).Contains(inQuery.UserRealName)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.OrganizationName.Contains(inQuery.OrganizationName)) - .WhereIf(inQuery.UserTypeEnum != null, t => t.UserTypeEnum == inQuery.UserTypeEnum) - //.WhereIf(_userInfo.IsAdmin, t => t.UserTypeRole.Type == UserTypeGroup.TrialUser) - //.WhereIf(!_userInfo.IsAdmin, t => t.UserTypeRole.Type == UserTypeGroup.TrialUser || t.UserTypeEnum != UserTypeEnum.ProjectManager) - .ProjectTo(_mapper.ConfigurationProvider, new { trialId = inQuery.TrialId }); - - return await query.ToPagedListAsync(inQuery); - - } - - - /// - /// Setting页面 批量添加项目参与人员 - /// - /// - /// - //[TrialAudit(AuditType.TrialAudit, AuditOptType.AddTrialStaff)] - [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] - //[Authorize(Policy = IRaCISPolicy.PM_APM)] - public async Task AddTrialUsers(TrialUserAddCommand[] userTrialCommands) - { - - var addArray = _mapper.Map(userTrialCommands); - - var trialUsers = await _trialUseRepository.AddRangeAsync(addArray); - - foreach (var item in trialUsers) - { - item.JoinTime = DateTime.Now; - } - - - var success = await _trialUseRepository.SaveChangesAsync(); - - return ResponseOutput.Result(success); - } - - - - [TrialGlobalLimit( "AfterStopCannNotOpt" )] - //[Authorize(Policy = IRaCISPolicy.PM_APM)] - [HttpPut] - public async Task UpdateTrialUser(UpdateTrialUserCommand updateTrialUserCommand) - { - var trialUser = await _trialUseRepository.Where(t => t.Id == updateTrialUserCommand.Id, true, true).FirstOrDefaultAsync(); - - if (trialUser == null) return Null404NotFound(trialUser); - - - if (updateTrialUserCommand.IsDeleted) - { - if (await _trialSiteUserRepository.AnyAsync(t => t.UserId == trialUser.UserId && t.TrialId == trialUser.TrialId)) - { - // ----人员已加入现场维护 - return ResponseOutput.NotOk(_localizer["TrialMaint_PersonnelJoined"]); - } - - if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC) - { - await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.CurrentActionUserId == trialUser.UserId && t.TrialId == trialUser.TrialId && t.IsTake, u => new SubjectVisit() { CurrentActionUserId = null, CurrentActionUserExpireTime = null, IsTake = false }); - } - - } - - _mapper.Map(updateTrialUserCommand, trialUser); - - await _trialUseRepository.SaveChangesAsync(); - - return ResponseOutput.Ok(); - - - } - - - /// 项目参与人员退出 其中IQC退出 回去释放工作量 - //[TrialAudit(AuditType.TrialAudit, AuditOptType.DeleteTrailStaff)] - [HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] - [UnitOfWork] - [Obsolete] - public async Task DeleteMaintenanceUser(Guid id, bool isDelete) - { - - var trialUser = await _trialUseRepository.AsQueryable().IgnoreQueryFilters().FirstOrDefaultAsync(t => t.Id == id); - - if (trialUser == null) return Null404NotFound(trialUser); - - if (await _trialSiteUserRepository.AnyAsync(t => t.UserId == trialUser.UserId && t.TrialId == trialUser.TrialId)) - { - //---人员已加入现场维护 - return ResponseOutput.NotOk(_localizer["TrialMaint_PersonnelJoined"]); - } - - if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC && isDelete) - { - await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.CurrentActionUserId == trialUser.UserId && t.TrialId == trialUser.TrialId && t.IsTake, u => new SubjectVisit() { CurrentActionUserId = null, CurrentActionUserExpireTime = null, IsTake = false }); - } - - await _trialUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new TrialUser() { IsDeleted = isDelete, RemoveTime = isDelete ? DateTime.Now : null }); - - await _trialUseRepository.SaveChangesAsync(); - - return ResponseOutput.Ok(); - } - } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index 6167dc699..3c1357226 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -16,18 +16,19 @@ namespace IRaCIS.Core.Application.Service [ApiExplorerSettings(GroupName = "Trial")] public class TrialService(IRepository _trialRepository, - IRepository _trialUserRepository, + IRepository _trialIdentityUserRepository, IRepository _croRepository, IRepository _enrollDetailRepository, IRepository _dictionaryRepository, IRepository _enrollRepository, + IOSSService _oSSService, IRepository _workloadRepository, IRepository _sponsorRepository, IRepository _visitStageRepository, IRepository _trialPaymentPriceRepository, IRepository _trialDictionaryRepository, IRepository _trialBodyPartRepository, - IOptionsMonitor _verifyConfig, + IOptionsMonitor _verifyConfig, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, ITrialService { @@ -90,8 +91,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(multiModalityIdSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Modality) == multiModalityIdSelectCount) .WhereIf(multiCriteriaSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Criterion) == multiCriteriaSelectCount) .WhereIf(multiReviewTypeSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.ReviewType) == multiReviewTypeSelectCount) - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) - .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, isEn_Us = _userInfo.IsEn_Us }); + .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.UserRoleId, isEn_Us = _userInfo.IsEn_Us }); return await query.ToPagedListAsync(inQuery); @@ -102,7 +102,7 @@ namespace IRaCIS.Core.Application.Service public async Task> GetTrialSelect() { return await _trialRepository.AsQueryable() - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.IsDeleted == false) + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId) && t.IsDeleted == false) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); } @@ -208,7 +208,14 @@ namespace IRaCIS.Core.Application.Service //如果是PM, 则需要将该人员添加到 运维人员表 //添加运维人员PM - await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trial.Id, UserId = _userInfo.Id, JoinTime = DateTime.Now }); + await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser() + { + TrialId = trial.Id, + IdentityUserId = _userInfo.IdentityUserId, + JoinTime = DateTime.Now, + TrialUserRoleList = new List(){ + new TrialUserRole(){TrialId=trial.Id,UserId=_userInfo.UserRoleId} } + }); // 添加扩展信息表记录 await _trialPaymentPriceRepository.AddAsync(new TrialPaymentPrice() { TrialId = trial.Id }); @@ -411,7 +418,18 @@ namespace IRaCIS.Core.Application.Service } } + /// + /// 标记项目删除 + /// + /// + /// + [HttpDelete, Route("{trialId:guid}")] + public async Task MarkTrialDelete(Guid trialId) + { + await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialId, u => new Trial() { IsDeleted = true }); + return ResponseOutput.Ok(); + } /// 真删除项目 方便清理测试数据 /// 临床试验项目Id @@ -483,6 +501,9 @@ namespace IRaCIS.Core.Application.Service await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); + await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); + await _repository.BatchDeleteNoTrackingAsync(t => t.VisitTask.TrialId == trialId); + await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.VisitTask.TrialId == trialId); @@ -510,7 +531,7 @@ namespace IRaCIS.Core.Application.Service await _repository.BatchDeleteNoTrackingAsync(t => t.TrialReadingCriterion.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _trialDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); - await _repository.BatchDeleteNoTrackingAsync(t => t.TrialDocument.TrialId == trialId); + await _repository.BatchDeleteNoTrackingAsync(t => t.TrialDocument.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialDocument.TrialId == trialId); @@ -539,8 +560,8 @@ namespace IRaCIS.Core.Application.Service await _repository.BatchDeleteNoTrackingAsync(t => t.TrialSiteSurvey.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialSiteSurvey.TrialId == trialId); - await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); - await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); + await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); + await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); @@ -548,6 +569,9 @@ namespace IRaCIS.Core.Application.Service await _repository.BatchDeleteNoTrackingAsync(t => t.OriginalReReadingTask.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); + + + await _oSSService.DeleteFromPrefix(trialId.ToString()); #endregion @@ -577,7 +601,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.Status == 8, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.InviteIntoGroup)) .WhereIf(inQuery.Status == 10, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.DoctorReading)) .WhereIf(inQuery.Status == 14, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.Finished)) - .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, isEn_Us = _userInfo.IsEn_Us }); + .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.UserRoleId, isEn_Us = _userInfo.IsEn_Us }); return await query.ToPagedListAsync(inQuery, nameof(TrialDetailDTO.CreateTime)); @@ -606,13 +630,13 @@ namespace IRaCIS.Core.Application.Service { var query = _trialRepository .WhereIf(inQuery.EnrollStatus != null, o => (int)inQuery.EnrollStatus! == 10 ? - o.EnrollList.Any(o => o.EnrollStatus >= EnrollStatus.ConfirmIntoGroup && o.EnrollStatus <= EnrollStatus.DoctorReading && o.DoctorId == _userInfo.Id) : - o.EnrollList.Any(o => o.EnrollStatus == inQuery.EnrollStatus && o.DoctorId == _userInfo.Id)) + o.EnrollList.Any(o => o.EnrollStatus >= EnrollStatus.ConfirmIntoGroup && o.EnrollStatus <= EnrollStatus.DoctorReading && o.DoctorId == _userInfo.UserRoleId) : + o.EnrollList.Any(o => o.EnrollStatus == inQuery.EnrollStatus && o.DoctorId == _userInfo.UserRoleId)) .WhereIf(inQuery.Expedited != null, o => o.Expedited == inQuery.Expedited) .WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.Indication), o => o.Indication.Contains(inQuery.Indication)) - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, isEn_Us = _userInfo.IsEn_Us }); + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))) + .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.UserRoleId, isEn_Us = _userInfo.IsEn_Us }); return await query.ToPagedListAsync(inQuery, nameof(TrialDetailDTO.CreateTime)); @@ -630,17 +654,17 @@ namespace IRaCIS.Core.Application.Service /// [HttpPost("{trialId:guid}/{status:int}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task UpdateEnrollStatus(Guid trialId, EnrollStatus status) { await _enrollDetailRepository.AddAsync(new EnrollDetail() { - DoctorId = _userInfo.Id, + DoctorId = _userInfo.UserRoleId, TrialId = trialId, EnrollStatus = status, OptUserType = (int)SystemUserType.DoctorUser, }); - return ResponseOutput.Result(await _enrollRepository.BatchUpdateNoTrackingAsync(u => u.TrialId == trialId && u.DoctorId == _userInfo.Id, e => new Enroll + return ResponseOutput.Result(await _enrollRepository.BatchUpdateNoTrackingAsync(u => u.TrialId == trialId && u.DoctorId == _userInfo.UserRoleId, e => new Enroll { EnrollStatus = status })); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs index e3feb10d1..f131d5625 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs @@ -10,15 +10,72 @@ namespace IRaCIS.Core.Application.Services { [ApiExplorerSettings(GroupName = "Trial")] public class TrialMaintenanceService(IRepository _trialSiteRepository, - IRepository _trialSiteUserRepository, + IRepository _trialSiteUserRoleRepository, IRepository _siteRepository, IRepository _subjectRepository, IRepository _visitTaskRepository, IRepository _trialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialSiteService { + #region 账户修改已维护 + /// 获取某一Site下面的负责的CRC列表 + [HttpGet, Route("{trialId:guid}/{siteId:guid}")] + public async Task> GetTrialSiteCRCList(Guid trialId, Guid siteId) + { + var query = _trialSiteUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == siteId).IgnoreQueryFilters() + .ProjectTo(_mapper.ConfigurationProvider); + + var list = await query.ToListAsync(); + + foreach (var item in list) + { + item.TrialSiteId = siteId; + } + + return list; + } + + + + /// 批量添加Site下 CRC的负责人 + [HttpPost] + [TrialGlobalLimit("AfterStopCannNotOpt")] + //[Authorize(Policy = IRaCISPolicy.PM_APM)] + public async Task AssignSiteCRC(List trialSiteCRCList) + { + var addArray = _mapper.Map>(trialSiteCRCList); + + await _trialSiteUserRoleRepository.AddRangeAsync(addArray); + + await _trialSiteUserRoleRepository.SaveChangesAsync(); + + return ResponseOutput.Result(true); + } + + /// 删除CRC人员 + [HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")] + [TrialGlobalLimit("AfterStopCannNotOpt")] + //[Authorize(Policy = IRaCISPolicy.PM_APM)] + public async Task DeleteSiteCRC(Guid id, bool isDelete) + { + + + await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.Id == id, u => new TrialSiteUserRole() { IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null }, true, true); + + //删除又启用改授权时间 + if (isDelete == false) + { + await _trialSiteUserRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new TrialSiteUserRole() { CreateTime = DateTime.Now }); + } + + return ResponseOutput.Ok(); + } + + + #endregion + /// Pannel 进去 SiteTab [HttpPost] @@ -30,9 +87,9 @@ namespace IRaCIS.Core.Application.Services .WhereIf(!string.IsNullOrWhiteSpace(inQuery.SiteName), t => t.TrialSiteName.Contains(inQuery.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(inQuery.TrialSiteAliasName)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteCode), t => t.TrialSiteCode.Contains(inQuery.TrialSiteCode)) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.Id)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserKeyInfo), t => t.CRCUserList.Any(k => (k.User.FullName).Contains(inQuery.UserKeyInfo) - || k.User.UserName.Contains(inQuery.UserKeyInfo) || k.User.EMail.Contains(inQuery.UserKeyInfo))) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.UserRoleId)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserKeyInfo), t => t.CRCUserList.Any(k => (k.UserRole.FullName).Contains(inQuery.UserKeyInfo) + || k.UserRole.IdentityUser.UserName.Contains(inQuery.UserKeyInfo) || k.UserRole.IdentityUser.EMail.Contains(inQuery.UserKeyInfo))) .ProjectTo(_mapper.ConfigurationProvider); @@ -52,9 +109,9 @@ namespace IRaCIS.Core.Application.Services .WhereIf(!string.IsNullOrWhiteSpace(inQuery.SiteName), t => t.TrialSiteName.Contains(inQuery.SiteName) || t.TrialSiteAliasName.Contains(inQuery.TrialSiteAliasName)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(inQuery.TrialSiteAliasName)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteCode), t => t.TrialSiteCode.Contains(inQuery.TrialSiteCode)) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.Id)) - .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserKeyInfo), t => t.CRCUserList.Any(k => (k.User.FullName).Contains(inQuery.UserKeyInfo) - || k.User.UserName.Contains(inQuery.UserKeyInfo) || k.User.EMail.Contains(inQuery.UserKeyInfo))) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.UserRoleId)) + .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserKeyInfo), t => t.CRCUserList.Any(k => (k.UserRole.FullName).Contains(inQuery.UserKeyInfo) + || k.UserRole.IdentityUser.UserName.Contains(inQuery.UserKeyInfo) || k.UserRole.IdentityUser.EMail.Contains(inQuery.UserKeyInfo))) .ProjectTo(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }); @@ -65,16 +122,6 @@ namespace IRaCIS.Core.Application.Services } - /// 获取某一Site下面的负责的CRC列表 - [HttpGet, Route("{trialId:guid}/{siteId:guid}")] - public async Task> GetTrialSiteCRCList(Guid trialId, Guid siteId) - { - var query = _trialSiteUserRepository.Where(t => t.TrialId == trialId && t.TrialSiteId == siteId).IgnoreQueryFilters() - .ProjectTo(_mapper.ConfigurationProvider); - - return await query.ToListAsync(); - } - /// [new] Setting页面 Site勾选列表( [HttpPost] @@ -111,7 +158,7 @@ namespace IRaCIS.Core.Application.Services [HttpPost] [UnitOfWork] //[Authorize(Policy = IRaCISPolicy.PM_APM)] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] public async Task AddTrialSites(List trialSites) { var addArray = _mapper.Map>(trialSites); @@ -152,7 +199,7 @@ namespace IRaCIS.Core.Application.Services if (editTrialSiteCommand.IsDeleted) { - if (await _trialSiteUserRepository.AnyAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId)) + if (await _trialSiteUserRoleRepository.AnyAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId)) { //---The site has been associated with CRC, and couldn't be deleted. return ResponseOutput.NotOk(_localizer["TrialSite_CannotDeleteAssociatedCRC"]); @@ -203,46 +250,6 @@ namespace IRaCIS.Core.Application.Services - /// 批量添加Site下 CRC的负责人 - [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] - //[Authorize(Policy = IRaCISPolicy.PM_APM)] - public async Task AssignSiteCRC(List trialSiteCRCList) - { - var addArray = _mapper.Map>(trialSiteCRCList); - - await _trialSiteUserRepository.AddRangeAsync(addArray); - - await _trialSiteUserRepository.SaveChangesAsync(); - return ResponseOutput.Result(true); - } - - /// 删除CRC人员 - [HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] - //[Authorize(Policy = IRaCISPolicy.PM_APM)] - public async Task DeleteSiteCRC(Guid id, bool isDelete) - { - - - await _trialSiteUserRepository.UpdatePartialFromQueryAsync(t => t.Id == id, u => new TrialSiteUser() { IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null }, true, true); - - //删除又启用改授权时间 - if (isDelete == false) - { - await _trialSiteUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new TrialSiteUser() { CreateTime = DateTime.Now }); - } - - ////不跟踪 - //await _trialSiteUserRepository.ExecuteUpdateAsync(t => t.Id == id, s=>s.SetProperty(t=>t.IsDeleted,u=>isDelete) - // .SetProperty(t=>t.DeletedTime,u=> isDelete ? DateTime.Now : null) - // .SetProperty(t=>t.CreateTime,u=>isDelete?u.CreateTime:DateTime.Now)); - - - - - return ResponseOutput.Ok(); - } /// /// 获取项目下的 site 下拉框数据 CRC只看到他负责的 @@ -255,7 +262,7 @@ namespace IRaCIS.Core.Application.Services //CRC只看到他负责的 var list = await _trialSiteRepository.Where(t => t.TrialId == trialId) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .ProjectTo(_mapper.ConfigurationProvider).OrderBy(t => t.TrialSiteCode).ToListAsync(); @@ -269,7 +276,7 @@ namespace IRaCIS.Core.Application.Services //CRC只看到他负责的 var list = await _trialSiteRepository.Where(t => t.TrialId == trialId) - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .Select(t => t.TrialSiteCode).ToListAsync(); var virtualList = await _visitTaskRepository.Where(t => t.IsSelfAnalysis == true && t.TrialId == trialId).Select(t => t.BlindTrialSiteCode).Distinct().ToListAsync(); @@ -280,7 +287,7 @@ namespace IRaCIS.Core.Application.Services /// 删除 项目 下某一site [HttpDelete("{id:guid}/{trialId:guid}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] [Obsolete] public async Task DeleteTrialSite(Guid id) { @@ -291,7 +298,7 @@ namespace IRaCIS.Core.Application.Services var trialId = relation.TrialId; var trialSiteId = relation.Id; - if (await _trialSiteUserRepository.AnyAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId)) + if (await _trialSiteUserRoleRepository.AnyAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId)) { //---The site has been associated with CRC, and couldn't be deleted. return ResponseOutput.NotOk(_localizer["TrialSite_CannotDeleteAssociatedCRC"]); @@ -305,7 +312,7 @@ namespace IRaCIS.Core.Application.Services await _trialSiteRepository.DeleteAsync(relation); - return ResponseOutput.Result(await _trialSiteUserRepository.SaveChangesAsync()); + return ResponseOutput.Result(await _trialSiteUserRoleRepository.SaveChangesAsync()); } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs index f94b5ae18..3af4d7205 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs @@ -37,22 +37,22 @@ namespace IRaCIS.Core.Application.Service - CreateMap(); + CreateMap(); CreateMap() .ForMember(x => x.Id, x => x.Ignore()); CreateMap(); - CreateMap(); + CreateMap(); - CreateMap(); + CreateMap(); - CreateMap(); + CreateMap(); - CreateMap(); + CreateMap(); //临床项目 @@ -86,26 +86,28 @@ namespace IRaCIS.Core.Application.Service - CreateMap().IncludeMembers(t => t.User) - .ForMember(d => d.UserRealName, u => u.MapFrom(s => s.User.FullName)) - .ForMember(t => t.UserType, u => u.MapFrom(t => t.User.UserTypeRole.UserTypeShortName)); - CreateMap(); + CreateMap().IncludeMembers(t => t.UserRole) + .ForMember(d => d.UserRealName, u => u.MapFrom(s => s.UserRole.FullName)) + .ForMember(t => t.UserType, u => u.MapFrom(t => t.UserRole.UserTypeRole.UserTypeShortName)); + CreateMap(); var trialSiteId = Guid.Empty; - CreateMap().IncludeMembers(t => t.User) - .ForMember(d => d.UserRealName, u => u.MapFrom(s => s.User.FullName)) + CreateMap().IncludeMembers(t => t.UserRole.IdentityUser) + .ForMember(d => d.UserRealName, u => u.MapFrom(s => s.UserRole.IdentityUser.FullName)) .ForMember(d => d.TrialSiteId, u => u.MapFrom(t => trialSiteId)) - .ForMember(d => d.UserType, u => u.MapFrom(t => t.User.UserTypeRole.UserTypeShortName)) + .ForMember(d => d.UserType, u => u.MapFrom(t => t.UserRole.UserTypeRole.UserTypeShortName)) .ForMember(d => d.IsSelect, u => u.MapFrom(t => t.Trial.TrialSiteUserList.Any(k => k.UserId == t.UserId && k.TrialSiteId== trialSiteId))); - CreateMap(); + + CreateMap(); var trialId = Guid.Empty; - CreateMap() + + CreateMap() .ForMember(d => d.UserRealName, u => u.MapFrom(s => s.FullName)) .ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName)) .ForMember(d => d.UserId, u => u.MapFrom(s => s.Id)) .ForMember(d => d.TrialId, u => u.MapFrom(s => trialId)) - .ForMember(d => d.IsSelect, u => u.MapFrom(t => t.UserTrials.Any(t => t.TrialId == trialId))); + .ForMember(d => d.IsSelect, u => u.MapFrom(t => t.UserRoleTrials.Any(t => t.TrialId == trialId))); CreateMap() @@ -125,8 +127,8 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.TrialSiteId, u => u.MapFrom(s => s.Id)) .ForMember(d => d.VisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count())) .ForMember(d => d.SubjectCount, u => u.MapFrom(s => s.SubjectList.Count())) - .ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count())) - .ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.User.FullName))); + //.ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count())) + .ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.UserRole.IdentityUser.FullName))); #endregion @@ -139,24 +141,24 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.UpdateTime, u => u.MapFrom(s => s.UpdateTime)) //.ForMember(d => d.Site, u => u.MapFrom(s => isEn_Us ?s.Site.SiteName:s.Site.SiteNameCN)) //.ForMember(d => d.Hospital, u => u.MapFrom(s => s.Site.Hospital.HospitalName)) - .ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count())) + //.ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count())) .ForMember(d => d.VisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count())) .ForMember(d => d.SubjectCount, u => u.MapFrom(s => s.SubjectList.Count())) - .ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.User.FullName))) + .ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.UserRole.IdentityUser.FullName))) .ForMember(d => d.CallingAEList, u => u.MapFrom(s => s.TrialSiteDicomAEList.Select(u => u.CallingAE))); //CreateMap(); - CreateMap().IncludeMembers(t => t.User) - .ForMember(d => d.UserType, u => u.MapFrom(s => s.User.UserTypeRole.UserTypeShortName)) - .ForMember(d => d.UserRealName, u => u.MapFrom(s => s.User.FullName)); - CreateMap(); + CreateMap().IncludeMembers(t => t.UserRole) + .ForMember(d => d.UserType, u => u.MapFrom(s => s.UserRole.UserTypeRole.UserTypeShortName)) + .ForMember(d => d.UserRealName, u => u.MapFrom(s => s.UserRole.FullName)); + CreateMap(); #endregion - CreateMap(); + CreateMap(); CreateMap().ForMember(t => t.TrialId, u => u.MapFrom(c => c.Id)) @@ -189,22 +191,22 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap() - .ForMember(t => t.UserRealName, u => u.MapFrom(c => c.CreateUser.FullName)) - .ForMember(t => t.UserName, u => u.MapFrom(c => c.CreateUser.UserName)); + .ForMember(t => t.UserRealName, u => u.MapFrom(c => c.CreateUserRole.FullName)) + .ForMember(t => t.UserName, u => u.MapFrom(c => c.CreateUserRole.IdentityUser.UserName)); CreateMap().ReverseMap(); - CreateMap(); + CreateMap(); CreateMap().ReverseMap(); - CreateMap(); + CreateMap(); CreateMap(); - CreateMap().ReverseMap(); + CreateMap().ReverseMap(); @@ -265,12 +267,12 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(t => t.TrialSiteUserList, u => u.Ignore()); - CreateMap().IncludeMembers(t => t.User) + CreateMap().IncludeMembers(t => t.UserRole) .ForMember(t => t.TrialSiteCode, u => u.MapFrom(c => c.TrialSite.TrialSiteCode)) .ForMember(t => t.TrialSiteAliasName, u => u.MapFrom(c => c.TrialSite.TrialSiteAliasName)) - .ForMember(t => t.UserRealName, u => u.MapFrom(c => c.User.FullName)) - .ForMember(t => t.UserType, u => u.MapFrom(c => c.User.UserTypeRole.UserTypeShortName)); - CreateMap(); + .ForMember(t => t.UserRealName, u => u.MapFrom(c => c.UserRole.FullName)) + .ForMember(t => t.UserType, u => u.MapFrom(c => c.UserRole.UserTypeRole.UserTypeShortName)); + CreateMap(); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig2.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig2.cs index 6d4fe9422..0a05dc208 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig2.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig2.cs @@ -1,4 +1,5 @@ using AutoMapper; +using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Share; @@ -50,6 +51,19 @@ namespace IRaCIS.Core.Application.Service CreateMap(); + CreateMap(); + + + //CreateMap(); + + + CreateMap(); + + CreateMap().IncludeMembers(t=>t.UserRole.IdentityUser) + .ForMember(t => t.IdentityUserId, u => u.MapFrom(c => c.UserRole.IdentityUserId)) + .ForMember(t => t.UserType, u => u.MapFrom(c => c.UserRole.UserTypeRole.UserTypeShortName)); + + CreateMap(); diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs index fd775a7a9..11cc30eaa 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs @@ -113,7 +113,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) // CRC 只负责他管理site的受试者 - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId)) .ProjectTo(_mapper.ConfigurationProvider) .WhereIf(inQuery.IsMissingImages != null, t => t.IsMissingImages == inQuery.IsMissingImages); diff --git a/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs b/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs index cf927ee17..54115ff3b 100644 --- a/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs @@ -26,7 +26,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(d => d.CreateUser, u => u.MapFrom(g => g.CreateUser.LastName + " / " + g.CreateUser.FirstName)); + .ForMember(d => d.CreateUser, u => u.MapFrom(g => g.CreateUserRole.IdentityUser.FullName)); diff --git a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs index 0c5117cec..805eb24dd 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs @@ -206,7 +206,7 @@ namespace IRaCIS.Core.Application.Service var doctorIntoGroupQueryable = from intoGroup in _enrollRepository.Where(x => x.TrialId == trialId && x.EnrollStatus >= EnrollStatus.ConfirmIntoGroup) - join allocateRule in _taskAllocationRuleRepository.AsQueryable() on intoGroup.Id equals allocateRule.EnrollId + join allocateRule in _taskAllocationRuleRepository.Where(x => x.TrialId == trialId) on intoGroup.Id equals allocateRule.EnrollId join doctor in _doctorRepository.AsQueryable() on intoGroup.DoctorId equals doctor.Id join attachmentItem in _attachmentRepository.AsQueryable() on intoGroup.AttachmentId equals attachmentItem.Id into cc from attachment in cc.DefaultIfEmpty() @@ -242,7 +242,7 @@ namespace IRaCIS.Core.Application.Service Id = x.Id }).ToList(), - ReadingTaskStateList = doctor.User.VisitTaskList.Where(x => x.TaskState == TaskState.Effect && x.TrialId == trialId).Select(x => new DoctorUserTask() + ReadingTaskStateList = intoGroup.DoctorUser.VisitTaskList.Where(x => x.TaskState == TaskState.Effect && x.TrialId == trialId).Select(x => new DoctorUserTask() { ReadingTaskState = x.ReadingTaskState, TrialReadingCriterionId = x.TrialReadingCriterionId, diff --git a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs index a7af63977..4d3381fdc 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs @@ -1,6 +1,7 @@ using DocumentFormat.OpenXml.Vml.Spreadsheet; using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Application.Service.WorkLoad.DTO; +using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infra.EFCore.Common; using Microsoft.AspNetCore.Mvc; @@ -16,8 +17,8 @@ namespace IRaCIS.Core.Application.Service IRepository _doctorRepository, IRepository _enrollDetailRepository, IRepository _workloadRepository, - IRepository _userRepository, - IRepository _trialUserRepository, + IRepository _userRoleRepository, + IRepository _trialUserRoleRepository, IRepository _ReadingQuestionCriterionTrialRepository, IRepository _trialExperienceRepository, @@ -114,7 +115,7 @@ namespace IRaCIS.Core.Application.Service /// [HttpPost("{trialId:guid}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] //[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)] public async Task SelectReviewers(Guid trialId, Guid[] doctorIdArray) { @@ -146,7 +147,7 @@ namespace IRaCIS.Core.Application.Service TrialId = trialId, EnrollStatus = EnrollStatus.HasApplyDownloadResume, - DoctorUserId = _userRepository.Where(t => t.DoctorId == doctorId).Select(t => t.Id).FirstOrDefault() + DoctorUserId = _userRoleRepository.Where(t => t.DoctorId == doctorId).Select(t => t.Id).FirstOrDefault() }); ; await _enrollDetailRepository.AddAsync(new EnrollDetail() @@ -167,21 +168,27 @@ namespace IRaCIS.Core.Application.Service /// [HttpPost("{trialId:guid}/{commitState:int}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] //[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)] public async Task SubmitReviewer(Guid trialId, Guid[] doctorIdArray, int commitState) { var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId); - var hasSPMOrCPM = await _trialUserRepository.Where(t => t.TrialId == trialId).AnyAsync(t => t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM); + var hasSPMOrCPM = await _trialRepository.Where(t => t.Id == trialId).AnyAsync(t => t.TrialIdentityUserList.SelectMany(t => t.TrialUserRoleList).Any(t => + t.UserRole.IdentityUser.Status == UserStateEnum.Enable + && t.UserRole.IsUserRoleDisabled == false + && (t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM || t.UserRole.UserTypeEnum == UserTypeEnum.SMM || t.UserRole.UserTypeEnum == UserTypeEnum.CMM)) + ); + + var isSPMjoin = trial.IsSPMJoinReviewerSelect && hasSPMOrCPM; if (trial != null) { if (commitState == 1) //确认提交CRO { //更新项目状态 - trial.TrialEnrollStatus = hasSPMOrCPM ? (int)TrialEnrollStatus.HasCommitCRO : (int)TrialEnrollStatus.HasConfirmedDoctorNames; + trial.TrialEnrollStatus = isSPMjoin ? (int)TrialEnrollStatus.HasCommitCRO : (int)TrialEnrollStatus.HasConfirmedDoctorNames; //添加项目详细记录 var trialDetail = new TrialStatusDetail() @@ -198,18 +205,18 @@ namespace IRaCIS.Core.Application.Service { if (doctorIdArray.Contains(intoGroupItem.DoctorId)) { - intoGroupItem.EnrollStatus = hasSPMOrCPM ? EnrollStatus.HasCommittedToCRO : EnrollStatus.InviteIntoGroup; + intoGroupItem.EnrollStatus = isSPMjoin ? EnrollStatus.HasCommittedToCRO : EnrollStatus.InviteIntoGroup; await _enrollDetailRepository.AddAsync(new EnrollDetail() { TrialDetailId = trialDetail.Id, DoctorId = intoGroupItem.DoctorId, TrialId = trialId, - EnrollStatus = hasSPMOrCPM ? EnrollStatus.HasCommittedToCRO : EnrollStatus.InviteIntoGroup, + EnrollStatus = isSPMjoin ? EnrollStatus.HasCommittedToCRO : EnrollStatus.InviteIntoGroup, OptUserType = (int)SystemUserType.AdminUser, //后台用户 }); - if (!hasSPMOrCPM) + if (!isSPMjoin) { await _enrollDetailRepository.AddAsync(new EnrollDetail() { @@ -251,7 +258,7 @@ namespace IRaCIS.Core.Application.Service } - return ResponseOutput.Result(await _enrollRepository.SaveChangesAsync(), new { IsHaveSPMOrCPM = hasSPMOrCPM }); + return ResponseOutput.Result(await _enrollRepository.SaveChangesAsync(), new { IsHaveSPMOrCPM = isSPMjoin }); } //$"Cannot find trial {trialId}" return ResponseOutput.NotOk(_localizer["Enroll_NotFound", trialId]); @@ -262,7 +269,7 @@ namespace IRaCIS.Core.Application.Service /// [HttpPost("{trialId:guid}/{auditState:int}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] //[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)] public async Task ApproveReviewer(Guid trialId, Guid[] doctorIdArray, int auditState) { @@ -348,11 +355,12 @@ namespace IRaCIS.Core.Application.Service /// [HttpPost] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] //[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)] [UnitOfWork] public async Task ConfirmReviewer(ConfirmReviewerCommand confirmReviewerCommand, - [FromServices] IRepository _trialUserRepository, + [FromServices] IRepository _trialUserRoleRepository, + [FromServices] IRepository _trialIdentityUserRepository, [FromServices] IRepository _taskAllocationRuleRepository) { //var trial = _trialRepository.FirstOrDefault(t => t.Id == trialId); @@ -386,7 +394,7 @@ namespace IRaCIS.Core.Application.Service return ResponseOutput.NotOk(string.Join(',', _localizer["Enroll_EmailFormat"], errorList.Select(c => c.LastName + " / " + c.FirstName))); } - + var readingQuestionCriterionTrial = await _ReadingQuestionCriterionTrialRepository.Where(x => x.TrialId == confirmReviewerCommand.TrialId && x.IsConfirm).ToListAsync(); @@ -402,22 +410,63 @@ namespace IRaCIS.Core.Application.Service { if (confirmReviewerCommand.DoctorIdArray.Contains(intoGroupItem.DoctorId)) { - //当邮件发送没有问题的时候,才修改状态 如果有问题,就当前不做处理 try { - var userId = await _mailVerificationService.DoctorJoinTrialEmail(trialId, intoGroupItem.DoctorId, confirmReviewerCommand.BaseUrl, confirmReviewerCommand.RouteUrl); + var (identityUserId, userRoleId) = await _mailVerificationService.DoctorJoinTrialEmail(trialId, intoGroupItem.DoctorId, confirmReviewerCommand.BaseUrl, confirmReviewerCommand.RouteUrl); - if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true)) + + var findTrialUser = await _trialIdentityUserRepository.Where(t => t.TrialId == trialId && t.IdentityUserId == identityUserId, true, true).Include(t => t.TrialUserRoleList).ThenInclude(t => t.UserRole).FirstOrDefaultAsync(); + + if (findTrialUser == null) { - await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now }); + //没有项目参与人员 + findTrialUser = await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser() + { + IdentityUserId = identityUserId, + TrialId = trialId, + JoinTime = DateTime.Now, + + TrialUserRoleList = new List() { new TrialUserRole() { TrialId = trialId, UserId = userRoleId } } + }); + } + else + { + + if (findTrialUser.IsDeleted == true) + { + findTrialUser.IsDeleted = false; + findTrialUser.DeletedTime = null; + findTrialUser.RemoveTime = null; + findTrialUser.JoinTime = DateTime.Now; + + } + + var findTrialUserRole = findTrialUser.TrialUserRoleList.Where(t => t.UserRole?.UserTypeId == userRoleId).FirstOrDefault(); + + if (findTrialUserRole == null) + { + //添加该角色 + findTrialUser.TrialUserRoleList.Add(new TrialUserRole() { TrialUserId = findTrialUser.Id, TrialId = trialId, UserId = userRoleId }); + } + else + { + //如果禁用,那么启用 + if (findTrialUserRole.IsDeleted == true) + { + findTrialUserRole.IsDeleted = false; + findTrialUser.DeletedTime = null; + } + + } } - await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.Id == intoGroupItem.Id, u => new Enroll() { DoctorUserId = userId }); + await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == userRoleId, u => new UserRole() { DoctorId = intoGroupItem.DoctorId }); + await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.Id == intoGroupItem.Id, u => new Enroll() { DoctorUserId = userRoleId }); - if (!await _taskAllocationRuleRepository.AnyAsync(t => t.TrialId == trialId && t.DoctorUserId == userId && t.EnrollId == intoGroupItem.Id, true)) + if (!await _taskAllocationRuleRepository.AnyAsync(t => t.TrialId == trialId && t.DoctorUserId == userRoleId && t.EnrollId == intoGroupItem.Id, true)) { - await _taskAllocationRuleRepository.AddAsync(new TaskAllocationRule() { TrialId = trialId, DoctorUserId = userId, EnrollId = intoGroupItem.Id }); + await _taskAllocationRuleRepository.AddAsync(new TaskAllocationRule() { TrialId = trialId, DoctorUserId = userRoleId, EnrollId = intoGroupItem.Id }); } @@ -435,8 +484,9 @@ namespace IRaCIS.Core.Application.Service } - catch (Exception) + catch (Exception ex) { + Console.WriteLine(ex.Message); intoGroupItem.EnrollStatus = EnrollStatus.ConfirmIntoGroupFailed; } @@ -469,10 +519,10 @@ namespace IRaCIS.Core.Application.Service PhaseId = trial.PhaseId, StartTime = DateTime.Now, IndicationEnum = trial.IndicationEnum, - IndicationTypeId= trial.IndicationTypeId, + IndicationTypeId = trial.IndicationTypeId, ExperienceDataType = dataType, TrialId = trial.Id, - OtherCriterion= item.CriterionType.GetEnumInt()=="0"? item.CriterionName:string.Empty, + OtherCriterion = item.CriterionType.GetEnumInt() == "0" ? item.CriterionName : string.Empty, VisitReadingCount = 0, ExperienceCriteriaList = new List() { @@ -512,7 +562,7 @@ namespace IRaCIS.Core.Application.Service } - + @@ -532,7 +582,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost("{trialId:guid}/{doctorId:guid}/{optType:int}")] - [TrialGlobalLimit( "AfterStopCannNotOpt" )] + [TrialGlobalLimit("AfterStopCannNotOpt")] //[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)] [Obsolete] public async Task EnrollBackOrOut(Guid trialId, Guid doctorId, int optType, DateTime? outEnrollTime) diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index 61d451cb8..99e28458e 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -1,4 +1,5 @@ using Aliyun.OSS; +using DocumentFormat.OpenXml.Spreadsheet; using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.BusinessFilter; using IRaCIS.Core.Application.Contracts; @@ -26,6 +27,7 @@ using MiniExcelLibs; using NPOI.SS.Formula.Functions; using NPOI.XWPF.UserModel; using System.Globalization; +using System.Reflection.Metadata.Ecma335; using System.Runtime.InteropServices; using System.Text; @@ -42,13 +44,13 @@ namespace IRaCIS.Core.Application.Service IRepository _trialClinicalDataSetCriterionRepository, IRepository _dicomInstanceRepository, IRepository _internationalizationRepository, - IRepository _systemDocConfirmedUserRepository, + IRepository _systemDocConfirmedUserRepository, IRepository _dicomStudyRepository, IRepository _clinicalDataTrialSetRepository, IRepository _readingQuestionCriterionTrialRepository, IRepository _visitTaskRepository, IRepository _dicomSeriesRepository, - IRepository _userRepository, + IRepository _userRoleRepository, IRepository _trialBodyPartRepository, IDistributedLockProvider _distributedLockProvider, ILogger _logger, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService @@ -93,11 +95,197 @@ namespace IRaCIS.Core.Application.Service // await _oSSService.DeleteFromPrefix($"{deleteId}"); //} + + var trialIdExistList = _trialRepository.Select(t => t.Id).ToList().Select(t => t.ToString()); + + #region 列出根目录 + + var aliConfig = _oSSService.ObjectStoreServiceOptions.AliyunOSS; + + var tempToken = _oSSService.GetObjectStoreTempToken(); + + var _ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint, + tempToken.AliyunOSS.AccessKeyId, + tempToken.AliyunOSS.AccessKeySecret, + tempToken.AliyunOSS.SecurityToken); + + + + var folderList = new List(); + + + try + { + ObjectListing objectListing = null; + string nextMarker = null; + do + { + // 使用 prefix 模拟目录结构,设置 MaxKeys 和 NextMarker + objectListing = _ossClient.ListObjects(new Aliyun.OSS.ListObjectsRequest(aliConfig.BucketName) + { + Prefix = "", // 根目录,留空即可 + Delimiter = "/", // 使用 "/" 来区分目录 + MaxKeys = 100, + Marker = nextMarker + }); + + folderList.AddRange(objectListing.CommonPrefixes.Select(t => t.Trim('/')).ToList()); + + + // 设置 NextMarker 以获取下一页的数据 + nextMarker = objectListing.NextMarker; + + } while (objectListing.IsTruncated); + } + catch (Exception ex) + { + Console.WriteLine($"Error: {ex.Message}"); + } + + + //清理项 + + var needDeleteTrialIdList = folderList.Except(trialIdExistList).ToList(); + + #endregion + await _oSSService.DeleteFromPrefix($"{rootFolder}"); return ResponseOutput.Ok(); } + + /// + /// 用户多账号,初次维护数据 + /// + /// + public async Task UserMutiAccount([FromServices] IRepository _identityUserRepository) + { + + if ((await _identityUserRepository.FirstOrDefaultAsync()) == null) + { + var userList = _userRoleRepository.Where().ToList(); + + foreach (var item in userList.GroupBy(t => t.EMail.Trim().ToLower())) + { + var emailUserIdList = item.Select(t => t.Id).ToList(); + + var identityUserId = NewId.NextSequentialGuid(); + + var selectUser = item.OrderByDescending(t => t.Status).FirstOrDefault(); + + var identityUser = _mapper.Map(selectUser); + + if (identityUser.IsFirstAdd) + { + identityUser.UserName = ""; + } + + identityUser.Id = identityUserId; + + await _identityUserRepository.AddAsync(identityUser); + + await _userRoleRepository.BatchUpdateNoTrackingAsync(t => emailUserIdList.Contains(t.Id), u => new UserRole() { IdentityUserId = identityUserId }); + } + + await _identityUserRepository.SaveChangesAsync(); + } + + // UPDATE[User] + //SET + // UserName = IdentityUser.UserName, + // FirstName = IdentityUser.FirstName, + //LastName = IdentityUser.LastName, + // EMail = IdentityUser.EMail + //FROM[User] + //INNER JOIN IdentityUser + //ON[User].IdentityUserId = IdentityUser.Id + + + + return ResponseOutput.Ok(); + } + + /// + /// 项目用户 维护数据 + /// + /// + /// + public async Task UserTrialUser([FromServices] IRepository _trialIdentityUserRepository, [FromServices] IRepository _trialUserRoleReposiotry) + { + _userInfo.IsNotNeedInspection = true; + + + if ((await _trialIdentityUserRepository.FirstOrDefaultAsync()) == null) + { + var list = _trialUserRoleReposiotry.Where().Select(t => new { t.TrialId, t.UserRole.IdentityUserId, t.UserId, t.JoinTime, t.RemoveTime }).ToList(); + + + foreach (var item in list.GroupBy(t => new { t.IdentityUserId, t.TrialId })) + { + + var id = NewId.NextSequentialGuid(); + + var userRoleList = item.ToList(); + + var userIdList = item.Select(t => t.UserId).ToList(); + + var first = userRoleList.First(); + + var haveJoin = userRoleList.Any(t => t.JoinTime != null); + + if (haveJoin) + { + await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser() { Id = id, IdentityUserId = item.Key.IdentityUserId, TrialId = item.Key.TrialId, JoinTime = userRoleList.Min(t => t.JoinTime) }); + + } + else + { + await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser() { Id = id, IdentityUserId = item.Key.IdentityUserId, TrialId = item.Key.TrialId, RemoveTime = userRoleList.Max(t => t.RemoveTime) }); + } + + await _trialUserRoleReposiotry.BatchUpdateNoTrackingAsync(t => t.TrialId == item.Key.TrialId && userIdList.Contains(t.UserId), u => new TrialUserRole() { TrialUserId = id }); + + } + + await _trialIdentityUserRepository.SaveChangesAsync(); + } + + + + return ResponseOutput.Ok(); + } + + /// + /// 外部人员 中心调研人员维护 + /// + /// + /// + /// + [UnitOfWork] + public async Task ExternalTrialUser( + [FromServices] IRepository _trialSiteUserSurveyRepository, + [FromServices] IRepository _trialExternalUserReposiotry, + [FromServices] IRepository _userRoleRepository) + { + var list = _userRoleRepository.Select(t => new { t.Id, t.IdentityUserId }).ToList(); + + foreach (var item in list.GroupBy(t => t.IdentityUserId)) + { + var userRoleIdList = item.Select(t => t.Id).ToList(); + + var identityUserId = item.Key; + + await _trialSiteUserSurveyRepository.BatchUpdateNoTrackingAsync(t => userRoleIdList.Contains(t.SystemUserId.Value), u => new TrialSiteUserSurvey() { SystemUserId = identityUserId }); + + await _trialExternalUserReposiotry.BatchUpdateNoTrackingAsync(t => userRoleIdList.Contains(t.SystemUserId), u => new TrialExternalUser() { SystemUserId = identityUserId }); + + } + + return ResponseOutput.Ok(); + } + + [LowerCamelCaseJson] public class TestModel { @@ -154,7 +342,7 @@ namespace IRaCIS.Core.Application.Service { var timeSpan = HolidayHelper.GetChinaWorkTimeSpan(startdate, endDate); - _userRepository.Where(t => t.Id == _userInfo.Id).Select(t => t.FullName).FirstOrDefault(); + _userRoleRepository.Where(t => t.Id == _userInfo.UserRoleId).Select(t => t.FullName).FirstOrDefault(); return $"{timeSpan.Days}天,{timeSpan.Hours}小时{timeSpan.Minutes}分钟{timeSpan.Seconds}秒"; } @@ -183,8 +371,7 @@ namespace IRaCIS.Core.Application.Service ConfirmTime = confirm.ConfirmTime, RealName = confirm.ConfirmUser.FullName, UserName = confirm.ConfirmUser.UserName, - UserTypeId = confirm.ConfirmUser.UserTypeId, - UserTypeShortName = confirm.ConfirmUser.UserTypeRole.UserTypeShortName, + FullFilePath = sysDoc.Path }; @@ -219,7 +406,7 @@ namespace IRaCIS.Core.Application.Service public async Task TestDistributedLock() { - await _userRepository.Where().Select(t => t.FullName).FirstNotNullAsync(); + await _userRoleRepository.Where().Select(t => t.FullName).FirstNotNullAsync(); Console.WriteLine($"我进来了当前值是:" + IntValue); _logger.LogWarning($"我进来了当前值是:" + IntValue); @@ -546,7 +733,7 @@ namespace IRaCIS.Core.Application.Service - //var d = _userRepository.Where(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault(); + //var d = _userRoleRepository.Where(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault(); //var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First(); //CultureInfo culture = CultureInfo.CurrentUICulture; diff --git a/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/IdenttiyUserRoleInfoTrigger.cs b/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/IdenttiyUserRoleInfoTrigger.cs new file mode 100644 index 000000000..eee6976d3 --- /dev/null +++ b/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/IdenttiyUserRoleInfoTrigger.cs @@ -0,0 +1,35 @@ +using EntityFrameworkCore.Triggered; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IRaCIS.Core.Application.Triggers.AfterSaveTrigger +{ + + /// + /// 维护用户角色表中的账户信息 + /// + /// + /// + public class IdenttiyUserRoleInfoTrigger(IRepository _identityUserRepository, IRepository _userRoleRepository) : IAfterSaveTrigger + { + public async Task AfterSave(ITriggerContext context, CancellationToken cancellationToken) + { + var identityUser = context.Entity; + + //保持用户角色表和用户表信息一致 + await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.IdentityUserId == identityUser.Id, u => new UserRole() + { + UserName = identityUser.UserName, + FirstName = identityUser.FirstName, + LastName = identityUser.LastName, + EMail = identityUser.EMail, + }); + } + } + + + +} diff --git a/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/UserLogAfterTrigger.cs b/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/UserLogAfterTrigger.cs new file mode 100644 index 000000000..48c0017e0 --- /dev/null +++ b/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/UserLogAfterTrigger.cs @@ -0,0 +1,68 @@ +using AutoMapper.QueryableExtensions; +using EntityFrameworkCore.Triggered; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IRaCIS.Core.Application.Triggers.AfterSaveTrigger +{ + /// + /// 账户日志 记录账户每次操作的信息 + /// + /// + public class UserLogAfterTrigger(IRepository _identityUserRepository) : IAfterSaveTrigger + { + public async Task AfterSave(ITriggerContext context, CancellationToken cancellationToken) + { + var userlog = context.Entity; + + if (context.ChangeType == ChangeType.Added) + { + + if (userlog.TargetIdentityUserId != null) + { + var obj = await _identityUserRepository.Where(t => t.Id == userlog.TargetIdentityUserId).Select(t => new UserLogJsonObj() + { + DepartmentName = t.DepartmentName, + EMail = t.EMail, + FirstName = t.FirstName, + LastName = t.LastName, + OrganizationName = t.OrganizationName, + Phone = t.Phone, + PositionName = t.PositionName, + Sex = t.Sex, + Status = t.Status, + UserCode = t.UserCode, + UserName = t.UserName, + UserRoleList = t.UserRoleList.Select(t => new UserRoleLogObj() + { + IsUserRoleDisabled = t.IsUserRoleDisabled, + UserTypeEnum = t.UserTypeEnum, + UserTypeShortName = t.UserTypeRole.UserTypeShortName + }).ToList() + + }).FirstOrDefaultAsync(); + + + + userlog.JsonObj = obj.ToJsonStr(); + + } + + if (userlog.ActionIdentityUserId != null && userlog.ActionUserName.IsNullOrWhiteSpace()) + { + userlog.ActionUserName = await _identityUserRepository.Where(t => t.Id == userlog.ActionIdentityUserId).Select(t => t.UserName).FirstOrDefaultAsync(); + } + + await _identityUserRepository.SaveChangesAsync(); + + + } + } + } + + + +} diff --git a/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/VisitTaskIsFrontTaskNeedSignButNotSignTrigger.cs b/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/VisitTaskIsFrontTaskNeedSignButNotSignTrigger.cs index 7c5136458..fb328e4b6 100644 --- a/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/VisitTaskIsFrontTaskNeedSignButNotSignTrigger.cs +++ b/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/VisitTaskIsFrontTaskNeedSignButNotSignTrigger.cs @@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Triggers } else { - //访视类型的任务 不影响肿瘤学任务的临床数据状态 + //访视类型、全局的任务 不影响肿瘤学任务的临床数据状态 visitTaskLambda = visitTaskLambda.And(x => x.ArmEnum != Arm.TumorArm); } diff --git a/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/AddlTrialUserTrigger.cs b/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/AddlTrialUserTrigger.cs deleted file mode 100644 index a59d46f6c..000000000 --- a/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/AddlTrialUserTrigger.cs +++ /dev/null @@ -1,55 +0,0 @@ -using EntityFrameworkCore.Triggered; -using IRaCIS.Core.Domain.Share; -using IRaCIS.Core.Infrastructure; -using Microsoft.Extensions.Localization; - -namespace IRaCIS.Core.Application.Triggers -{ - - // 统一处理 外部用户、中心调研(先添加 再发送邮件)、参与医生加入到项目 ----废弃 - public class AddlTrialUserTrigger( - IStringLocalizer _localizer, - IRepository _trialRepository, - IRepository _userRepository) : IBeforeSaveTrigger - - { - - public async Task BeforeSave(ITriggerContext context, CancellationToken cancellationToken) - { - var trialUser = context.Entity; - - if (context.ChangeType == ChangeType.Added) - { - //批量添加的时候,使用Find 不会多次查询,优先从跟踪的内存中查找 - var trialInfo = await _trialRepository.FindAsync(trialUser.TrialId); - - // 必须包在同一个事务,有的时候是数据库还没用户,不能直接查询数据库 - var user = await _userRepository.FindAsync(trialUser.UserId); - - if (trialInfo.TrialType == Domain.Share.TrialType.OfficialTrial || trialInfo.TrialType == Domain.Share.TrialType.Training) - { - - if (user.IsTestUser) - { - //---正式类型 、培训类型的项目 不允许加入测试用户 - throw new BusinessValidationFailedException(_localizer["AddlTrialUser_NoTestUser"]); - - } - } - - if (trialInfo.TrialType == TrialType.NoneOfficial) - { - - if (user.IsTestUser == false) - { - //---测试项目 不允许加入正式用户 - throw new BusinessValidationFailedException(_localizer["AddlTrialUser_NoFormalUser"]); - - } - } - } - } - } - - -} diff --git a/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs b/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs index 3adc7fcfd..ca7dd488a 100644 --- a/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs +++ b/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs @@ -28,15 +28,16 @@ namespace IRaCIS.Core.Application.Triggers } - public class UserAddTrigger(IUserInfo _userInfo, IRepository _userLogReposiotry) : IBeforeSaveTrigger + public class UserAddTrigger(IUserInfo _userInfo, IRepository _userLogReposiotry) : IBeforeSaveTrigger { - public async Task BeforeSave(ITriggerContext context, CancellationToken cancellationToken) + public async Task BeforeSave(ITriggerContext context, CancellationToken cancellationToken) { var user = context.Entity; if (context.ChangeType == ChangeType.Added) { - await _userLogReposiotry.AddAsync(new UserLog() { OptType = UserOptType.AddUser, OptUserId = user.Id, LoginUserId = _userInfo.Id, IP = _userInfo.IP }); + await _userLogReposiotry.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = _userInfo.IdentityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = user.Id, OptType = UserOptType.AddUser }, true); + } diff --git a/IRaCIS.Core.Domain.Share/Reading/ImageFilterState.cs b/IRaCIS.Core.Domain.Share/Reading/ImageFilterState.cs index 6baea1987..60bef07e3 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ImageFilterState.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ImageFilterState.cs @@ -14,6 +14,13 @@ public enum UserOptType [Description("用户登录")] Login = 1, + [Description("选择登录角色")] + LoginSelectRole =18, + + [Description("更新用户角色")] + UpdateUserRole =15, + + [Description("用户登出")] LoginOut = 2, @@ -37,15 +44,15 @@ public enum UserOptType //admin 重置密码 ResetPassword = 9, - DeleteUser = 10, - UpdateUser = 11, MFALogin = 12, - MFALoginFail = 13, + TempLockLogin = 13, - AddUser = 14 + AddUser = 14, + + WebUnlock=16 } [Description("影像下载打包状态")] diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index ee9202cc4..c9224209c 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -16,6 +16,21 @@ namespace IRaCIS.Core.Domain.Share public static readonly string BasicTable = "basicTable"; public static readonly string Group = "group"; + + /// + /// 截图 + /// + public static readonly string Screenshot = "screenshot"; + + /// + /// 小结 + /// + public static readonly string Summary = "summary"; + + /// + /// 附件 + /// + public static readonly string Upload = "upload"; } @@ -410,18 +425,6 @@ namespace IRaCIS.Core.Domain.Share } - /// - /// 导出标识 - /// - public enum ExportIdentification - { - /// - /// 无 - /// - None = 0, - - } - /// /// 导出结果 /// @@ -432,7 +435,6 @@ namespace IRaCIS.Core.Domain.Share /// None = 0, - /// /// /// 阅片结果表 /// @@ -471,6 +473,11 @@ namespace IRaCIS.Core.Domain.Share /// OCT_ReadingLession_Export = 7, + /// + /// CDISC导出 + /// + CDISC = 8, + //访视一致率 VisitJudgeRatio_Export = 17, @@ -672,6 +679,22 @@ namespace IRaCIS.Core.Domain.Share Acknowledgement = 1 } + /// + /// 标准分组 + /// + public enum CriterionGroup + { + /// + /// 非肿瘤 + /// + Nontumorous = 0, + + /// + /// 肿瘤 + /// + Tumor = 1, + + } /// /// 标准类型 @@ -784,6 +807,11 @@ namespace IRaCIS.Core.Domain.Share /// OCT定量评估 /// OCT = 20, + + /// + /// MRIPDFF + /// + MRIPDFF = 21, } @@ -1913,6 +1941,10 @@ public enum SUVChangeVSBaseline /// FCT = 112, + /// + /// 脂肪分数 + /// + FatFraction = 121, } @@ -2263,13 +2295,75 @@ public enum SUVChangeVSBaseline /// Undetermined = 1021, + /// + /// 第一次测量 + /// + FirstMeasurement = 1101, + + /// + /// 第二次测量 + /// + SecondMeasurement = 1102, + + /// + /// 第三次测量 + /// + ThirdMeasurement = 1103, + + /// + /// 平均值 + /// + AverageValue = 1104, + + /// + /// 是否可测量 + /// + IsMeasurable = 1105, + + /// + /// 肝脏分段 + /// + liverSegmentation = 1106, } - /// - /// 影像质量问题 - /// - public enum ImageQualityIssues + /// + /// 脂肪肝分级 + /// + public enum FattyLiverClassification + { + /// + /// NE + /// + NE = 0, + + /// + /// 0级 + /// + Level0=1, + + /// + /// 1级 + /// + Level1=2, + + /// + /// 2级 + /// + Level2=3, + + /// + /// 3级 + /// + Level3=4, + + } + + + /// + /// 影像质量问题 + /// + public enum ImageQualityIssues { /// /// 解剖不完整 @@ -2653,6 +2747,16 @@ public enum SUVChangeVSBaseline /// 斑块3-匹配动脉段最小FCT /// Plaque3MinFCT = 1008, + + /// + /// 脂肪分数总平均值 + /// + TotalMeanFraction = 1101, + + /// + /// 脂肪肝分级 + /// + FattyLiverGrading = 1102, } @@ -2782,8 +2886,17 @@ public enum PET5PSScore /// /// 斑块数据统计 /// - PatchDataStatistics = 9, + + /// + /// 保存表格问题标记 + /// + SaveTableQuestionMark = 10, + + /// + /// 保存肝脏分段 + /// + SaveLiverSegments = 11, } /// diff --git a/IRaCIS.Core.Domain/Allocation/SubjectUser.cs b/IRaCIS.Core.Domain/Allocation/SubjectUser.cs index 475c19ec0..549c901ec 100644 --- a/IRaCIS.Core.Domain/Allocation/SubjectUser.cs +++ b/IRaCIS.Core.Domain/Allocation/SubjectUser.cs @@ -19,7 +19,7 @@ public class SubjectUser : BaseFullAuditEntity [JsonIgnore] public List EarlierSubjectUserList { get; set; } [JsonIgnore] - public User DoctorUser { get; set; } + public UserRole DoctorUser { get; set; } [JsonIgnore] public Subject Subject { get; set; } diff --git a/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs b/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs index 6dda502b9..f1b34a1df 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs @@ -8,7 +8,7 @@ public class TaskAllocationRule : BaseFullAuditEntity [ForeignKey("DoctorUserId")] [JsonIgnore] - public User DoctorUser { get; set; } + public UserRole DoctorUser { get; set; } [JsonIgnore] public Enroll Enroll { get; set; } diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index b2c80102e..e1aa6fc8c 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -16,10 +16,10 @@ public class TaskMedicalReview : BaseFullAuditEntity #region 导航属性 [JsonIgnore] - public User LatestReplyUser { get; set; } + public UserRole LatestReplyUser { get; set; } [JsonIgnore] - public User MedicalManagerUser { get; set; } + public UserRole MedicalManagerUser { get; set; } [JsonIgnore] [ForeignKey("VisitTaskId")] diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs index e5aa996ba..7f76b0cf1 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs @@ -7,7 +7,7 @@ public class TaskMedicalReviewRule : BaseFullAuditEntity #region 导航属性 [JsonIgnore] - public User DoctorUser { get; set; } + public UserRole DoctorUser { get; set; } #endregion public Guid DoctorUserId { get; set; } diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index 4efb9a1dd..88b2a3322 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -18,7 +18,7 @@ public class VisitTask : BaseFullAuditEntity [ForeignKey("TrialReadingCriterionId")] public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; } [ForeignKey("DoctorUserId")] - public User DoctorUser { get; set; } + public UserRole DoctorUser { get; set; } [ForeignKey("SouceReadModuleId")] public ReadModule ReadModule { get; set; } @@ -193,7 +193,11 @@ public class VisitTask : BaseFullAuditEntity [Comment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)")] public Guid? JudgeResultTaskId { get; set; } - [Comment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定")] + + + [Comment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.02 全局任务在截止访视号上+0.03 肿瘤0.06")] + + [DecimalPrecision(18,2)] public decimal VisitTaskNum { get; set; } [Comment("首次阅片时间")] public DateTime? FirstReadingTime { get; set; } diff --git a/IRaCIS.Core.Domain/Allocation/VisitTaskReReading.cs b/IRaCIS.Core.Domain/Allocation/VisitTaskReReading.cs index 8a5c392d4..e7666e20a 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTaskReReading.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTaskReReading.cs @@ -9,7 +9,7 @@ public class VisitTaskReReading : BaseFullAuditEntity #region 导航属性 [JsonIgnore] - public User RequestReReadingUser { get; set; } + public UserRole RequestReReadingUser { get; set; } [JsonIgnore] public VisitTask NewReReadingTask { get; set; } @@ -18,7 +18,7 @@ public class VisitTaskReReading : BaseFullAuditEntity [JsonIgnore] public VisitTask OriginalReReadingTask { get; set; } [JsonIgnore] - public User RequestReReadingConfirmUser { get; set; } + public UserRole RequestReReadingConfirmUser { get; set; } [JsonIgnore] public Trial Trial { get; set; } diff --git a/IRaCIS.Core.Domain/BaseModel/Entity.cs b/IRaCIS.Core.Domain/BaseModel/Entity.cs index 671393d49..55847a041 100644 --- a/IRaCIS.Core.Domain/BaseModel/Entity.cs +++ b/IRaCIS.Core.Domain/BaseModel/Entity.cs @@ -81,7 +81,7 @@ public abstract class BaseAddAuditEntity : Entity, IAuditAdd [ForeignKey("CreateUserId")] [JsonIgnore] - public virtual User CreateUser { get; set; } + public virtual UserRole CreateUserRole { get; set; } } public abstract class BaseAddDeleteAuditEntity : Entity, IAuditAdd, ISoftDelete @@ -95,7 +95,7 @@ public abstract class BaseAddDeleteAuditEntity : Entity, IAuditAdd, ISoftDelete [ForeignKey("CreateUserId")] [JsonIgnore] - public User CreateUser { get; set; } + public UserRole CreateUserRole { get; set; } } public abstract class BaseFullAuditEntity : Entity, IAuditUpdate, IAuditAdd @@ -107,7 +107,7 @@ public abstract class BaseFullAuditEntity : Entity, IAuditUpdate, IAuditAdd [ForeignKey("CreateUserId")] [JsonIgnore] - public User CreateUser { get; set; } + public UserRole CreateUserRole { get; set; } } public abstract class BaseFullDeleteAuditEntity : Entity, IAuditUpdate, IAuditAdd, ISoftDelete { @@ -121,7 +121,7 @@ public abstract class BaseFullDeleteAuditEntity : Entity, IAuditUpdate, IAuditAd [ForeignKey("CreateUserId")] [JsonIgnore] - public User CreateUser { get; set; } + public UserRole CreateUserRole { get; set; } } public abstract class BaseAuditUpdateEntity : Entity, IAuditUpdate diff --git a/IRaCIS.Core.Domain/Dcotor/Doctor.cs b/IRaCIS.Core.Domain/Dcotor/Doctor.cs index 9c3fca3fc..bbc3e79de 100644 --- a/IRaCIS.Core.Domain/Dcotor/Doctor.cs +++ b/IRaCIS.Core.Domain/Dcotor/Doctor.cs @@ -39,7 +39,7 @@ public class Doctor : BaseFullAuditEntity public List CriterionFileList { get; set; } [JsonIgnore] - public User User { get; set; } + public UserRole UserRole { get; set; } #endregion public bool AcceptingNewTrial { get; set; } @@ -247,4 +247,34 @@ public class Doctor : BaseFullAuditEntity /// Ŀ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/Document/SystemDocConfirmedUser.cs b/IRaCIS.Core.Domain/Document/SystemDocConfirmedUser.cs index 633ad4b14..ac7494a57 100644 --- a/IRaCIS.Core.Domain/Document/SystemDocConfirmedUser.cs +++ b/IRaCIS.Core.Domain/Document/SystemDocConfirmedUser.cs @@ -11,7 +11,34 @@ public class SystemDocConfirmedUser : BaseAddDeleteAuditEntity [JsonIgnore] [ForeignKey("ConfirmUserId")] - public User ConfirmUser { get; set; } + public UserRole ConfirmUser { get; set; } + #endregion + public Guid SystemDocumentId { get; set; } + + public DateTime? ConfirmTime { get; set; } + public Guid ConfirmUserId { get; set; } + + public DateTime? SignFirstViewTime { get; set; } + + [StringLength(1000)] + public string SignText { get; set; } = string.Empty; +} + + + + +[Comment("后台 - 系统文档签署记录")] +[Table("SystemDocConfirmedIdentityUser")] +public class SystemDocConfirmedIdentityUser : BaseAddDeleteAuditEntity + +{ + #region 导航属性 + [JsonIgnore] + public SystemDocument SystemDocument { get; set; } + + [JsonIgnore] + [ForeignKey("ConfirmUserId")] + public IdentityUser ConfirmUser { get; set; } #endregion public Guid SystemDocumentId { get; set; } diff --git a/IRaCIS.Core.Domain/Document/SystemDocument.cs b/IRaCIS.Core.Domain/Document/SystemDocument.cs index 1edc28880..1ab33394d 100644 --- a/IRaCIS.Core.Domain/Document/SystemDocument.cs +++ b/IRaCIS.Core.Domain/Document/SystemDocument.cs @@ -6,7 +6,7 @@ public class SystemDocument : BaseFullDeleteAuditEntity { #region 导航属性 [JsonIgnore] - public List SystemDocConfirmedUserList { get; set; } + public List SystemDocConfirmedUserList { get; set; } [JsonIgnore] public List NeedConfirmedUserTypeList { get; set; } [JsonIgnore] diff --git a/IRaCIS.Core.Domain/Document/TrialDocConfirmedUser.cs b/IRaCIS.Core.Domain/Document/TrialDocConfirmedUser.cs index 023ecb832..e2ef07614 100644 --- a/IRaCIS.Core.Domain/Document/TrialDocConfirmedUser.cs +++ b/IRaCIS.Core.Domain/Document/TrialDocConfirmedUser.cs @@ -8,7 +8,7 @@ public class TrialDocConfirmedUser : BaseAddDeleteAuditEntity [JsonIgnore] [ForeignKey("ConfirmUserId")] - public User User { get; set; } + public UserRole User { get; set; } [JsonIgnore] public TrialDocument TrialDocument { get; set; } #endregion @@ -20,3 +20,24 @@ public class TrialDocConfirmedUser : BaseAddDeleteAuditEntity [StringLength(1000)] public string SignText { get; set; } = string.Empty; } + + +public class TrialDocConfirmedIdentityUser : BaseAddDeleteAuditEntity +{ + #region 导航属性 + + [JsonIgnore] + [ForeignKey("ConfirmUserId")] + public IdentityUser User { get; set; } + [JsonIgnore] + public TrialDocument TrialDocument { get; set; } + #endregion + + public Guid TrialDocumentId { get; set; } + public DateTime? ConfirmTime { get; set; } + public Guid ConfirmUserId { get; set; } + public DateTime? SignFirstViewTime { get; set; } + + [StringLength(1000)] + public string SignText { get; set; } = string.Empty; +} diff --git a/IRaCIS.Core.Domain/Document/TrialDocument.cs b/IRaCIS.Core.Domain/Document/TrialDocument.cs index f3885b390..f9de87e4c 100644 --- a/IRaCIS.Core.Domain/Document/TrialDocument.cs +++ b/IRaCIS.Core.Domain/Document/TrialDocument.cs @@ -6,7 +6,7 @@ public class TrialDocument : BaseFullDeleteAuditEntity { #region 导航属性 [JsonIgnore] - public List TrialDocConfirmedUserList { get; set; } + public List TrialDocConfirmedUserList { get; set; } [JsonIgnore] public List NeedConfirmedUserTypeList { get; set; } [JsonIgnore] diff --git a/IRaCIS.Core.Domain/Document/TrialEmailNoticeConfig.cs b/IRaCIS.Core.Domain/Document/TrialEmailNoticeConfig.cs index 01a80a558..479049efe 100644 --- a/IRaCIS.Core.Domain/Document/TrialEmailNoticeConfig.cs +++ b/IRaCIS.Core.Domain/Document/TrialEmailNoticeConfig.cs @@ -96,7 +96,7 @@ public class TrialEmailBlackUser : Entity public TrialEmailNoticeConfig TrialEmailNoticeConfig { get; set; } [JsonIgnore] - public User User { get; set; } + public UserRole User { get; set; } public Guid TrialEmailNoticeConfigId { get; set; } public Guid UserId { get; set; } } diff --git a/IRaCIS.Core.Domain/Institution/Hospital.cs b/IRaCIS.Core.Domain/Institution/Hospital.cs index 8c63b89dd..94500f0ab 100644 --- a/IRaCIS.Core.Domain/Institution/Hospital.cs +++ b/IRaCIS.Core.Domain/Institution/Hospital.cs @@ -23,6 +23,7 @@ public class Hospital : BaseFullAuditEntity public string CountryCN { get; set; } = string.Empty; public string ProvinceCN { get; set; } = string.Empty; public string CityCN { get; set; } = string.Empty; + [Comment("中心Id")] public Guid? SiteId { get; set; } = Guid.Empty; } diff --git a/IRaCIS.Core.Domain/Management/Notice/SystemNotice.cs b/IRaCIS.Core.Domain/Management/Notice/SystemNotice.cs index 91e89956f..fc05cb432 100644 --- a/IRaCIS.Core.Domain/Management/Notice/SystemNotice.cs +++ b/IRaCIS.Core.Domain/Management/Notice/SystemNotice.cs @@ -37,7 +37,7 @@ public class SystemNotice : BaseFullAuditEntity public Guid? PublishedUserId { get; set; } - public User PublishedUser { get; set; } + public UserRole PublishedUser { get; set; } public DateTime? PublishedTime { get; set; } diff --git a/IRaCIS.Core.Domain/Management/User.cs b/IRaCIS.Core.Domain/Management/User.cs index 087a418bd..149358eb6 100644 --- a/IRaCIS.Core.Domain/Management/User.cs +++ b/IRaCIS.Core.Domain/Management/User.cs @@ -3,20 +3,24 @@ using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models; -[Comment("̨ - ϵͳ˻")] +[Comment("̨ - ϵͳ˻ɫϵ")] [Table("User")] -public class User : BaseFullAuditEntity +public class UserRole : BaseFullAuditEntity { #region + [ForeignKey("IdentityUserId")] + [JsonIgnore] + public IdentityUser IdentityUser { get; set; } + + [JsonIgnore] + [ForeignKey("UserTypeId")] public UserType UserTypeRole { get; set; } - [JsonIgnore] - public List SystemDocConfirmedList { get; set; } [JsonIgnore] - public List UserTrials { get; set; } = new List(); + public List UserRoleTrials { get; set; } = new List(); [JsonIgnore] public List VisitTaskList { get; set; } @@ -26,21 +30,42 @@ public class User : BaseFullAuditEntity #endregion + public string UserName { get; set; } + public string EMail { get; set; } + public string FirstName { get; set; } + + public string LastName { get; set; } + + [Comment("Զлһ")] public bool AutoCutNextTask { get; set; } + #region ɾûϢ + public int Code { get; set; } - public string DepartmentName { get; set; } = null!; + public string UserCode { get; set; } + - [Comment("ҽ˺ź󣬻ֵ")] - public Guid? DoctorId { get; set; } + public string Password { get; set; } - public string EMail { get; set; } = null!; + + public string Phone { get; set; } + public string OrganizationName { get; set; } [StringLength(1000)] - public string EmailToken { get; set; } = null!; + public string EmailToken { get; set; } - public string FirstName { get; set; } = null!; + + public bool PasswordChanged { get; set; } + public int? Sex { get; set; } + + public UserStateEnum Status { get; set; } = UserStateEnum.Enable; + + + public string PositionName { get; set; } + + + public string DepartmentName { get; set; } [Comment("״ε¼Ҫ޸")] public bool IsFirstAdd { get; set; } = true; @@ -53,36 +78,100 @@ public class User : BaseFullAuditEntity [Comment("һ޸ʱ")] public DateTime? LastChangePassWordTime { get; set; } - public string LastLoginIP { get; set; } = null!; + public string LastLoginIP { get; set; } public DateTime? LastLoginTime { get; set; } - public string LastName { get; set; } = null!; + [Comment("ɾ")] + public bool SuperAdmin { get; set; } - public string OrganizationName { get; set; } = null!; - public string Password { get; set; } = null!; + #endregion + + + + [Comment("ҽ˺ź󣬻ֵ")] + public Guid? DoctorId { get; set; } + + public UserTypeEnum UserTypeEnum { get; set; } + + public Guid UserTypeId { get; set; } + + #region ֶ + + public Guid IdentityUserId { get; set; } + + public bool IsUserRoleDisabled { get; set; } + + #endregion +} + +[Comment("̨ - ϵͳʵ˻")] +[Table("IdentityUser")] +public class IdentityUser: BaseFullAuditEntity +{ + [JsonIgnore] + public List UserTrialList { get; set; } + + [JsonIgnore] + public List UserRoleList { get; set; } = new List(); + + [JsonIgnore] + public List SystemDocConfirmedList { get; set; } + + [Projectable] + public string FullName => LastName + " / " + FirstName; + + #region ûϢ + + public int Code { get; set; } + public string UserCode { get; set; } + public string UserName { get; set; } + public string EMail { get; set; } + + [StringLength(1000)] + public string EmailToken { get; set; } + + public string FirstName { get; set; } + + public string LastName { get; set; } + + public string Password { get; set; } public bool PasswordChanged { get; set; } - - public string Phone { get; set; } = null!; - - - public string PositionName { get; set; } = null!; + public string Phone { get; set; } public int? Sex { get; set; } public UserStateEnum Status { get; set; } = UserStateEnum.Enable; - public bool SuperAdmin { get; set; } - - public string UserCode { get; set; } = null!; + public string OrganizationName { get; set; } - public string UserName { get; set; } = null!; - public UserTypeEnum UserTypeEnum { get; set; } + public string PositionName { get; set; } - public Guid UserTypeId { get; set; } -} + [Comment("ֶηϳûɫ棬ɾ")] + public bool AutoCutNextTask { get; set; } + + public string DepartmentName { get; set; } + + [Comment("״ε¼Ҫ޸")] + public bool IsFirstAdd { get; set; } = true; + + public bool IsTestUser { get; set; } + + [Comment("ڲû ⲿû")] + public bool IsZhiZhun { get; set; } + + [Comment("һ޸ʱ")] + public DateTime? LastChangePassWordTime { get; set; } + + public string LastLoginIP { get; set; } + + public DateTime? LastLoginTime { get; set; } + + + #endregion +} \ No newline at end of file diff --git a/IRaCIS.Core.Domain/Management/UserLog.cs b/IRaCIS.Core.Domain/Management/UserLog.cs index 58af47440..ae40f4681 100644 --- a/IRaCIS.Core.Domain/Management/UserLog.cs +++ b/IRaCIS.Core.Domain/Management/UserLog.cs @@ -8,20 +8,91 @@ public class UserLog : BaseAddAuditEntity { #region 导航属性 [JsonIgnore] - public User LoginUser { get; set; } + public IdentityUser TargetIdentityUser { get; set; } + [JsonIgnore] - public User OptUser { get; set; } + public IdentityUser ActionIdentityUser { get; set; } + #endregion + public string IP { get; set; } = string.Empty; - public string LoginFaildName { get; set; } = string.Empty; public UserOptType OptType { get; set; } public string LoginPassword { get; set; } = string.Empty; - public Guid? LoginUserId { get; set; } - [Comment("被操作的人,自己操作的就是自己")] - public Guid? OptUserId { get; set; } public string IPRegion { get; set; } = string.Empty; + + #region 账号修改 维护 + + public Guid? ActionIdentityUserId { get; set; } + + public string ActionUserName { get; set; } + + public string ActionUserType { get; set; } + + + [MaxLength] + public string JsonObj { get; set; } + + + [Comment("被操作的对象 admin 修改张三信息 张三是被操作对象")] + public Guid? TargetIdentityUserId { get; set; } + + #endregion + + [Comment("异地登录")] + public bool IsLoginUncommonly { get; set; } + + + + #region 后续删除 + public string LoginFaildName { get; set; } = string.Empty; + + [Comment("后续删除")] + public Guid? LoginUserId { get; set; } + [Comment("被操作的人,自己操作的就是自己--后续删除")] + public Guid? OptUserId { get; set; } + #endregion + + + } + +public class UserLogJsonObj +{ + public string FullName => LastName + " / " + FirstName; + + public string UserCode { get; set; } + public string UserName { get; set; } + public string EMail { get; set; } + + public string FirstName { get; set; } + + public string LastName { get; set; } + + public string Phone { get; set; } + + public int? Sex { get; set; } + + public UserStateEnum Status { get; set; } = UserStateEnum.Enable; + + public string OrganizationName { get; set; } + public string PositionName { get; set; } + + public string DepartmentName { get; set; } + + public List UserRoleList { get; set; } + +} + + +public class UserRoleLogObj +{ + public string UserTypeShortName { get; set; } + + public UserTypeEnum UserTypeEnum { get; set; } + + public bool IsUserRoleDisabled { get; set; } +} diff --git a/IRaCIS.Core.Domain/Management/UserPassWordLog.cs b/IRaCIS.Core.Domain/Management/UserPassWordLog.cs index 858442a0f..07263be67 100644 --- a/IRaCIS.Core.Domain/Management/UserPassWordLog.cs +++ b/IRaCIS.Core.Domain/Management/UserPassWordLog.cs @@ -13,4 +13,6 @@ public class UserPassWordLog : BaseAddAuditEntity [Comment("密码")] public string PassWord { get; set; } = string.Empty; + + public Guid IdentityUserId { get; set; } } diff --git a/IRaCIS.Core.Domain/Management/UserType.cs b/IRaCIS.Core.Domain/Management/UserType.cs index bc07c5cc7..b4012b58e 100644 --- a/IRaCIS.Core.Domain/Management/UserType.cs +++ b/IRaCIS.Core.Domain/Management/UserType.cs @@ -15,7 +15,7 @@ public class UserType : Entity public List SystemDocNeedConfirmedUserTypeList { get; set; } [JsonIgnore] - public List UserList { get; set; } + public List UserList { get; set; } #endregion public UserTypeEnum UserTypeEnum { get; set; } diff --git a/IRaCIS.Core.Domain/QC/QCChallenge.cs b/IRaCIS.Core.Domain/QC/QCChallenge.cs index ef7aee7e7..67dfb3c6f 100644 --- a/IRaCIS.Core.Domain/QC/QCChallenge.cs +++ b/IRaCIS.Core.Domain/QC/QCChallenge.cs @@ -10,7 +10,7 @@ public class QCChallenge : BaseAddAuditEntity #region 导航属性 [JsonIgnore] [ForeignKey("LatestReplyUserId")] - public User LatestReplyUser { get; set; } + public UserRole LatestReplyUser { get; set; } [JsonIgnore] [Comment("导航属性")] [ForeignKey("SubjectVisitId")] diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionSystem.cs index 6a3b2afef..cb0e1588d 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionSystem.cs @@ -28,6 +28,12 @@ public class ReadingQuestionCriterionSystem : BaseAddAuditEntity public string Description { get; set; } = string.Empty; [Comment("标准类型")] public CriterionType CriterionType { get; set; } + + /// + /// 标准分组 + /// + public CriterionGroup CriterionGroup { get; set; } + [Comment("肿瘤学阅片")] public bool IsOncologyReading { get; set; } = false; diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs index 3a2d77ac4..f87f00640 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs @@ -74,6 +74,11 @@ public class ReadingQuestionCriterionTrial : BaseAddAuditEntity [Comment("标准类型")] public CriterionType CriterionType { get; set; } + /// + /// 标准分组 + /// + public CriterionGroup CriterionGroup { get; set; } + [Comment("是否加急")] public bool IsUrgent { get; set; } = false; diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs index 17e5986e8..f9954bd67 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs @@ -207,9 +207,6 @@ public class ReadingQuestionSystem : BaseAddAuditEntity [Comment("高亮问题的答案")] public string HighlightAnswer { get; set; } = "[]"; - [Comment("导出标识")] - public ExportIdentification? ExportIdentification { get; set; } - [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs index 170a821a1..69f3668b4 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs @@ -271,12 +271,14 @@ public class ReadingQuestionTrial : BaseAddAuditEntity [Comment("高亮问题的答案")] public string HighlightAnswer { get; set; } = "[]"; - [Comment("导出标识")] - public ExportIdentification? ExportIdentification { get; set; } - [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; + /// + /// 导出的CDISCName + /// + public string CDISCCode { get; set; } = string.Empty; + [NotMapped] public List ExportResult { diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionSystem.cs index 4b71e92bd..c9c89025a 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionSystem.cs @@ -65,7 +65,8 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity [Comment("问题名称")] public string QuestionName { get; set; } = string.Empty; - + [Comment("默认值")] + public string DefaultValue { get; set; } = string.Empty; public IsRequired IsRequired { get; set; } [Comment("排序号")] @@ -163,9 +164,6 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity [Comment("分类算法")] public string ClassifyAlgorithms { get; set; } = string.Empty; - [Comment("导出标识")] - public ExportIdentification? ExportIdentification { get; set; } - [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs index 0cc03697c..ffefed9fe 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs @@ -93,6 +93,9 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity public ShowQuestion ShowQuestion { get; set; } public int? MaxRowCount { get; set; } + [Comment("默认值")] + public string DefaultValue { get; set; } = string.Empty; + [Comment("图片数量")] public int? ImageCount { get; set; } @@ -171,12 +174,14 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity /// public ClassifyShowType? ClassifyShowType { get; set; } - [Comment("导出标识")] - public ExportIdentification? ExportIdentification { get; set; } - [Comment("导出结果")] public string ExportResultStr { get; set; } = "[]"; + /// + /// 导出的CDISCName + /// + public string CDISCCode { get; set; } = string.Empty; + [NotMapped] public List ExportResult { diff --git a/IRaCIS.Core.Domain/Reading/ReadingFormAnswer/ReadingTaskQuestionMark.cs b/IRaCIS.Core.Domain/Reading/ReadingFormAnswer/ReadingTaskQuestionMark.cs index 56528e210..72d489d1b 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingFormAnswer/ReadingTaskQuestionMark.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingFormAnswer/ReadingTaskQuestionMark.cs @@ -33,7 +33,7 @@ public class ReadingTaskQuestionMark : BaseAddAuditEntity [MaxLength] public string MeasureData { get; set; } = string.Empty; - public Guid? FirstAddTaskId { get; set; } + public Guid? FristAddTaskId { get; set; } public QuestionType? QuestionType { get; set; } public string OrderMarkName { get; set; } = string.Empty; @@ -44,6 +44,15 @@ public class ReadingTaskQuestionMark : BaseAddAuditEntity public Guid? OtherStudyId { get; set; } + /// + /// 表格问题标记 + /// + public Guid? RowId { get; set; } + + public Guid? TableQuestionId { get; set; } + + public decimal? RowIndex { get; set; } + [MaxLength] public string OtherMarkTool { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs index 48ac5e5a3..43cfce7f6 100644 --- a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs +++ b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs @@ -17,9 +17,9 @@ public class TrialSiteSurvey : BaseFullDeleteAuditEntity [JsonIgnore] public Trial Trial { get; set; } [JsonIgnore] - public User ReviewerUser { get; set; } + public UserRole ReviewerUser { get; set; } [JsonIgnore] - public User PreliminaryUser { get; set; } + public UserRole PreliminaryUser { get; set; } #endregion public Guid TrialSiteId { get; set; } diff --git a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs index 6382ed7ce..df88dbed4 100644 --- a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs +++ b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs @@ -27,6 +27,7 @@ public class TrialSiteUserSurvey : BaseFullAuditEntity public string OrganizationName { get; set; } = string.Empty; + [Comment("IdentityUser 表的用户Id")] public Guid? SystemUserId { get; set; } public bool IsGenerateAccount { get; set; } @@ -41,10 +42,13 @@ public class TrialSiteUserSurvey : BaseFullAuditEntity /// public bool IsHistoryUser { get; set; } + /// + /// 调研设置用户退出 + /// public bool? IsHistoryUserDeleted { get; set; } /// - /// 中心人员删除了 + /// 中心人员设置退出了 /// public bool? IsHistoryUserOriginDeleted { get; set; } } diff --git a/IRaCIS.Core.Domain/Trial/Enroll.cs b/IRaCIS.Core.Domain/Trial/Enroll.cs index 1f176375b..f41341c99 100644 --- a/IRaCIS.Core.Domain/Trial/Enroll.cs +++ b/IRaCIS.Core.Domain/Trial/Enroll.cs @@ -13,7 +13,7 @@ public partial class Enroll : BaseFullAuditEntity [JsonIgnore] public virtual Doctor Doctor { get; set; } [JsonIgnore] - public User DoctorUser { get; set; } + public UserRole DoctorUser { get; set; } [JsonIgnore] public List EnrollReadingCategoryList { get; set; } @@ -52,6 +52,8 @@ public partial class Enroll : BaseFullAuditEntity public int? Global { get; set; } public int? Downtime { get; set; } + + [Comment("生成账号 加入到项目中后 赋值")] public Guid? DoctorUserId { get; set; } } diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index 2178c8a44..8577a27dd 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -38,7 +38,10 @@ public partial class Trial : BaseFullDeleteAuditEntity [JsonIgnore] public List WorkloadList { get; set; } = new List(); [JsonIgnore] - public List TrialUserList { get; set; } = new List(); + public List TrialUserRoleList { get; set; } = new List(); + + [JsonIgnore] + public List TrialIdentityUserList { get; set; } [JsonIgnore] public List TrialReadingCriterionList { get; set; } = new List(); [JsonIgnore] @@ -50,7 +53,7 @@ public partial class Trial : BaseFullDeleteAuditEntity [JsonIgnore] public List TrialSiteList { get; set; } = new List(); [JsonIgnore] - public List TrialSiteUserList { get; set; } = new List(); + public List TrialSiteUserList { get; set; } = new List(); [JsonIgnore] public List ReadModuleList { get; set; } = new List(); [JsonIgnore] @@ -213,7 +216,7 @@ public partial class Trial : BaseFullDeleteAuditEntity public bool IsTrialStart { get; set; } = false; [Comment("QC 问题流程")] - public User QCQuestionConfirmedUser { get; set; } + public UserRole QCQuestionConfirmedUser { get; set; } public Guid? QCQuestionConfirmedUserId { get; set; } public DateTime? QCQuestionConfirmedTime { get; set; } @@ -264,6 +267,27 @@ public partial class Trial : BaseFullDeleteAuditEntity [StringLength(2000)] public List TrialObjectNameList { get; set; } + [Comment("SPM 参与中心调研")] + public bool IsSPMJoinSiteSurvey { get; set; } + + [Comment("SPM 参与阅片人筛选")] + public bool IsSPMJoinReviewerSelect { get; set; } + + [Comment("SPM 参与重阅审批")] + public bool IsSPMJoinReReadingApproval { get; set; } + + [Comment("阅片任务产生之前 采集影像")] + public CollectImagesType CollectImagesEnum { get; set; } + +} + +public enum CollectImagesType +{ + None = 0, + + Dicom = 1, + + NoneDicom = 2 } [ComplexType] diff --git a/IRaCIS.Core.Domain/Trial/TrialStatusDetail.cs b/IRaCIS.Core.Domain/Trial/TrialStatusDetail.cs index 4baa2b531..740c60fa6 100644 --- a/IRaCIS.Core.Domain/Trial/TrialStatusDetail.cs +++ b/IRaCIS.Core.Domain/Trial/TrialStatusDetail.cs @@ -5,9 +5,6 @@ namespace IRaCIS.Core.Domain.Models; public partial class TrialStatusDetail : BaseAddAuditEntity { #region - [JsonIgnore] - public List IntoGroupDetails { get; set; } - [JsonIgnore] public Trial Trial { get; set; } #endregion diff --git a/IRaCIS.Core.Domain/TrialSiteUser/TrialExternalUser.cs b/IRaCIS.Core.Domain/TrialSiteUser/TrialExternalUser.cs index de1dbd244..caaefcc3a 100644 --- a/IRaCIS.Core.Domain/TrialSiteUser/TrialExternalUser.cs +++ b/IRaCIS.Core.Domain/TrialSiteUser/TrialExternalUser.cs @@ -21,6 +21,8 @@ public class TrialExternalUser : BaseFullAuditEntity public string LastName { get; set; } = String.Empty; public string OrganizationName { get; set; } = String.Empty; public bool IsSystemUser { get; set; } + + [Comment("IdentityUser 表的用户Id")] public Guid SystemUserId { get; set; } public bool IsJoin { get; set; } public DateTime? ExpireTime { get; set; } diff --git a/IRaCIS.Core.Domain/TrialSiteUser/TrialSite.cs b/IRaCIS.Core.Domain/TrialSiteUser/TrialSite.cs index 810d82070..f20b90246 100644 --- a/IRaCIS.Core.Domain/TrialSiteUser/TrialSite.cs +++ b/IRaCIS.Core.Domain/TrialSiteUser/TrialSite.cs @@ -21,7 +21,7 @@ public class TrialSite : BaseFullDeleteAuditEntity public List TrialSiteSurveyList { get; set; } [Comment("Site 由多个人负责")] [JsonIgnore] - public List CRCUserList { get; set; } + public List CRCUserList { get; set; } [JsonIgnore] public List SubjectList { get; set; } diff --git a/IRaCIS.Core.Domain/TrialSiteUser/TrialSiteUser.cs b/IRaCIS.Core.Domain/TrialSiteUser/TrialSiteUser.cs index 110096fd6..3349f5985 100644 --- a/IRaCIS.Core.Domain/TrialSiteUser/TrialSiteUser.cs +++ b/IRaCIS.Core.Domain/TrialSiteUser/TrialSiteUser.cs @@ -1,14 +1,14 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("项目 - 项目中心用户关系表")] +[Comment("项目 - 项目中心用户角色关系表")] [Table("TrialSiteUser")] -public class TrialSiteUser : BaseFullDeleteAuditEntity +public class TrialSiteUserRole : BaseFullDeleteAuditEntity { #region 导航属性 [JsonIgnore] [ForeignKey("UserId")] - public User User { get; set; } + public UserRole UserRole { get; set; } [JsonIgnore] [ForeignKey("TrialId")] public Trial Trial { get; set; } diff --git a/IRaCIS.Core.Domain/TrialSiteUser/TrialUser.cs b/IRaCIS.Core.Domain/TrialSiteUser/TrialUser.cs index c2bdad498..992e821af 100644 --- a/IRaCIS.Core.Domain/TrialSiteUser/TrialUser.cs +++ b/IRaCIS.Core.Domain/TrialSiteUser/TrialUser.cs @@ -1,9 +1,9 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("运维人员与项目关联关系表 - 实体")] +[Comment("项目用户角色表")] [Table("TrialUser")] -public class TrialUser : BaseFullDeleteAuditEntity +public class TrialUserRole : BaseFullDeleteAuditEntity { #region 导航属性 [JsonIgnore] @@ -11,13 +11,57 @@ public class TrialUser : BaseFullDeleteAuditEntity [JsonIgnore] [ForeignKey("UserId")] - public User User { get; set; } + public UserRole UserRole { get; set; } + + [JsonIgnore] + [ForeignKey("TrialUserId")] + public TrialIdentityUser TrialUser { get; set; } + #endregion + [Comment("这里实际是UserRoleId")] public Guid UserId { get; set; } public Guid TrialId { get; set; } + + + public Guid TrialUserId { get; set; } + + #region 下个版本删除 + public DateTime? RemoveTime { get; set; } + + public DateTime? JoinTime { get; set; } + #endregion + +} + + + +[Comment("项目用户表")] +[Table("TrialIdentityUser")] +public class TrialIdentityUser : BaseFullDeleteAuditEntity +{ + #region 导航属性 + + [JsonIgnore] + public Trial Trial { get; set; } + + [JsonIgnore] + [ForeignKey("IdentityUserId")] + public IdentityUser IdentityUser { get; set; } + + [JsonIgnore] + + public List TrialUserRoleList { get; set; } + + #endregion + + + public Guid TrialId { get; set; } + + public Guid IdentityUserId { get; set; } + public DateTime? RemoveTime { get; set; } public DateTime? JoinTime { get; set; } -} +} \ No newline at end of file diff --git a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs index 751ea0be7..df62719e8 100644 --- a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs +++ b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs @@ -14,28 +14,28 @@ public class SubjectVisit : BaseFullDeleteAuditEntity [ForeignKey("OutPlanPreviousVisitId")] public SubjectVisit OutPlanPreviousVisit { get; set; } [ForeignKey("ForwardUserId")] - public User ForwardUser { get; set; } + public UserRole ForwardUser { get; set; } /// /// 初审 /// [JsonIgnore] [ForeignKey("PreliminaryAuditUserId")] - public User PreliminaryAuditUser { get; set; } + public UserRole PreliminaryAuditUser { get; set; } /// /// 复审 /// [JsonIgnore] [ForeignKey("ReviewAuditUserId")] - public User ReviewAuditUser { get; set; } + public UserRole ReviewAuditUser { get; set; } [JsonIgnore] [ForeignKey("CurrentActionUserId")] - public User CurrentActionUser { get; set; } + public UserRole CurrentActionUser { get; set; } [JsonIgnore] [ForeignKey("SubmitUserId")] - public User SubmitUser { get; set; } + public UserRole SubmitUser { get; set; } [JsonIgnore] [ForeignKey("TrialId")] public Trial Trial { get; set; } diff --git a/IRaCIS.Core.Infra.EFCore/AuthUser/IUserInfo.cs b/IRaCIS.Core.Infra.EFCore/AuthUser/IUserInfo.cs index e05a11ed2..e9434387f 100644 --- a/IRaCIS.Core.Infra.EFCore/AuthUser/IUserInfo.cs +++ b/IRaCIS.Core.Infra.EFCore/AuthUser/IUserInfo.cs @@ -6,12 +6,13 @@ public interface IUserInfo { - Guid Id { get; } + Guid UserRoleId { get; } + + Guid IdentityUserId { get; } string UserName { get; } - string RealName { get; } - string ReviewerCode { get; } + string FullName { get; } bool IsAdmin { get; } diff --git a/IRaCIS.Core.Infra.EFCore/AuthUser/UserInfo.cs b/IRaCIS.Core.Infra.EFCore/AuthUser/UserInfo.cs index 6b6e1253e..099baccea 100644 --- a/IRaCIS.Core.Infra.EFCore/AuthUser/UserInfo.cs +++ b/IRaCIS.Core.Infra.EFCore/AuthUser/UserInfo.cs @@ -15,13 +15,29 @@ namespace IRaCIS.Core.Domain.Share } /// - /// 用户Id + /// 用户角色Id /// - public Guid Id + public Guid UserRoleId { get { - var id = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.Id); + var id = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.UserRoleId); + if (id != null && !string.IsNullOrEmpty(id.Value)) + { + return Guid.Parse(id.Value); + } + return Guid.Empty; + } + } + + /// + /// 真实用户Id + /// + public Guid IdentityUserId + { + get + { + var id = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.IdentityUserId); if (id != null && !string.IsNullOrEmpty(id.Value)) { return Guid.Parse(id.Value); @@ -51,7 +67,7 @@ namespace IRaCIS.Core.Domain.Share { get { - var name = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.Name); + var name = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.UserName); if (name != null && !string.IsNullOrEmpty(name.Value)) { @@ -63,11 +79,11 @@ namespace IRaCIS.Core.Domain.Share } - public string RealName + public string FullName { get { - var name = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.RealName); + var name = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.FullName); if (name != null && !string.IsNullOrEmpty(name.Value)) { @@ -78,19 +94,7 @@ namespace IRaCIS.Core.Domain.Share } } - public string ReviewerCode - { - get - { - var reviewerCode = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.Code); - if (reviewerCode != null && !string.IsNullOrEmpty(reviewerCode.Value)) - { - return reviewerCode.Value; - } - return string.Empty; - } - } public string UserTypeShortName @@ -342,16 +346,16 @@ namespace IRaCIS.Core.Domain.Share public struct JwtIRaCISClaimType { - public const string Id = "id"; + public const string IdentityUserId = "identityUserId"; + public const string UserRoleId = "userRoleId"; public const string Code = "code"; - public const string Name = "name"; - public const string RealName = "realName"; + public const string UserName = "name"; + public const string FullName = "fullName"; public const string UserTypeId = "userTypeId"; public const string UserTypeEnum = "userTypeEnum"; public const string UserTypeEnumName = "userTypeEnumName"; public const string UserTypeEnumInt = "userTypeEnumInt"; public const string UserTypeShortName = "userTypeShortName"; - public const string IsAdmin = "isAdmin"; public const string IsTestUser = "isTestUser"; @@ -366,17 +370,25 @@ namespace IRaCIS.Core.Domain.Share { public static string GetClientIP(this HttpContext context) { - var ip = context.Request.Headers["Cdn-Src-Ip"].FirstOrDefault(); - if (!string.IsNullOrEmpty(ip)) + //scp 服务创建的记录不能获取请求上下文 + if (context != null) + { + var ip = context.Request.Headers["Cdn-Src-Ip"].FirstOrDefault(); + if (!string.IsNullOrEmpty(ip)) + return IpReplace(ip); + + ip = context.Request.Headers["X-Forwarded-For"].FirstOrDefault(); + if (!string.IsNullOrEmpty(ip)) + return IpReplace(ip); + + ip = context.Connection.RemoteIpAddress.ToString(); + return IpReplace(ip); - - ip = context.Request.Headers["X-Forwarded-For"].FirstOrDefault(); - if (!string.IsNullOrEmpty(ip)) - return IpReplace(ip); - - ip = context.Connection.RemoteIpAddress.ToString(); - - return IpReplace(ip); + } + else + { + return string.Empty; + } } static string IpReplace(string inip) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index df26621ad..d8618ad05 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -61,9 +61,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common { return new List() { - typeof(TrialUser), + typeof(TrialUserRole), + typeof(TrialIdentityUser), typeof(TrialSiteSurvey), - typeof(TrialSiteUser), + typeof(TrialSiteUserRole), typeof(VisitStage), typeof(TrialSite) }; @@ -894,11 +895,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common } // 项目文件签署 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialDocConfirmedUser))) + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialDocConfirmedIdentityUser))) { var type = GetEntityAuditOpt(item); - var entity = item.Entity as TrialDocConfirmedUser; + var entity = item.Entity as TrialDocConfirmedIdentityUser; var extraIdentification = string.Empty; @@ -917,7 +918,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common var trialDoc = await _dbContext.TrialDocument.Where(x => x.Id == entity.TrialDocumentId).FirstOrDefaultAsync(); - await InsertInspection(entity as TrialDocConfirmedUser, type, x => new InspectionConvertDTO() + await InsertInspection(entity as TrialDocConfirmedIdentityUser, type, x => new InspectionConvertDTO() { TrialId = trialDoc.TrialId, ExtraIndentification = extraIdentification, @@ -1716,32 +1717,100 @@ namespace IRaCIS.Core.Infra.EFCore.Common }); } - - - // 项目人员 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialUser))) + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(UserRole))) { var type = GetEntityAuditOpt(item); - var entity = item.Entity as TrialUser; + var entity = item.Entity as UserRole; //var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId); - await InsertInspection(entity, type, x => new InspectionConvertDTO + await InsertInspection(entity, type, x => new InspectionConvertDTO { IsDistinctionInterface = type == AuditOpt.Update ? true : false, + }); + } + + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(IdentityUser))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as IdentityUser; + + + await InsertInspection(entity, type, x => new InspectionConvertDTO + { + IsDistinctionInterface = type == AuditOpt.Update ? true : false, + }); + } + + // 项目参与人员 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialIdentityUser))) + { + var type = GetEntityAuditOpt(item); + var entity = item.Entity as TrialIdentityUser; + string extraIndentification = string.Empty; + + var identityUser = await _dbContext.IdentityUser.AsNoTracking().Where(x => x.Id == entity.IdentityUserId).FirstOrDefaultAsync(); + + // 变更维护数据,会维护数据,不能插入稽查 + if (_userInfo.IsNotNeedInspection == false) + { + await InsertInspection(entity, type, x => new InspectionConvertDTO + { + //IsDistinctionInterface = true , + TrialId = x.TrialId, + IsDistinctionInterface = false, + ObjectRelationParentId = x.TrialId, + ExtraIndentification = extraIndentification, + //ObjectRelationParentId2 = x.IdentityUserId, + }, new + { + + identityUser.FullName, + identityUser.EMail, + identityUser.Code, + identityUser.UserCode, + identityUser.UserName, + identityUser.DepartmentName, + identityUser.Phone, + identityUser.OrganizationName, + }); + } + } + + // 项目人员 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialUserRole))) + { + var type = GetEntityAuditOpt(item); + var entity = item.Entity as TrialUserRole; + string extraIndentification = string.Empty; + if (type == AuditOpt.Update) + { + extraIndentification = "/" + entity.IsDeleted.ToString(); + } + + var userTypeEnum = await _dbContext.Users.Where(x => x.Id == entity.UserId).Select(x => x.UserTypeEnum).FirstOrDefaultAsync(); + //var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId); + await InsertInspection(entity, type, x => new InspectionConvertDTO + { + IsDistinctionInterface = false, TrialId = x.TrialId, ObjectRelationParentId = x.TrialId, + ExtraIndentification = extraIndentification, ObjectRelationParentId2 = x.UserId, + }, new + { + UserTypeEnum = userTypeEnum, }); } // 项目中心人员 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSiteUser))) + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSiteUserRole))) { var type = GetEntityAuditOpt(item); - var entity = item.Entity as TrialSiteUser; + var entity = item.Entity as TrialSiteUserRole; if (entity.TrialSite == null) @@ -1749,7 +1818,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common entity.TrialSite = await _dbContext.TrialSite.Where(x => x.Id == entity.TrialSiteId).IgnoreQueryFilters().FirstOrDefaultAsync(); } - await InsertInspection(item.Entity as TrialSiteUser, type, x => new InspectionConvertDTO + await InsertInspection(item.Entity as TrialSiteUserRole, type, x => new InspectionConvertDTO { IsDistinctionInterface = type == AuditOpt.Update ? true : false, TrialId = x.TrialId, @@ -1926,8 +1995,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common await InsertInspection(item.Entity as TaskStudy, type, x => new InspectionConvertDTO() { ObjectRelationParentId = x.VisitTaskId, - },new { - ArmEnum= armEnum, + }, new + { + ArmEnum = armEnum, }); } @@ -1980,7 +2050,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common var extraIdentification = string.Empty; Arm armEnum = Arm.SingleReadingArm; - if (entity.VisitTaskId!=null) + if (entity.VisitTaskId != null) { extraIdentification = "/VisitTask"; armEnum = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Select(x => x.ArmEnum).FirstOrDefaultAsync(); @@ -1991,7 +2061,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common await InsertInspection(item.Entity as NoneDicomStudyFile, type, x => new InspectionConvertDTO() { - TrialId= trialid, + TrialId = trialid, ObjectRelationParentId = x.VisitTaskId, ExtraIndentification = extraIdentification }, new @@ -2631,11 +2701,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common #region 阅片 //用户添加 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(User))) + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(UserRole))) { var type = GetEntityAuditOpt(item); - var entity = item.Entity as User; + var entity = item.Entity as UserRole; var extraIdentification = string.Empty; @@ -2645,7 +2715,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common extraIdentification = "/Personalization"; } - await InsertInspection(entity, type, x => new InspectionConvertDTO() + await InsertInspection(entity, type, x => new InspectionConvertDTO() { IsDistinctionInterface = false, ExtraIndentification = extraIdentification @@ -2655,7 +2725,30 @@ namespace IRaCIS.Core.Infra.EFCore.Common } ); } + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(IdentityUser))) + { + var type = GetEntityAuditOpt(item); + var entity = item.Entity as IdentityUser; + + var extraIdentification = string.Empty; + + //保存其他个性化配置 + if (_userInfo.RequestUrl == "UserWLTemplate/setAutoCutNextTask") + { + extraIdentification = "/Personalization"; + } + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + IsDistinctionInterface = false, + ExtraIndentification = extraIdentification + }, new + { + UserRealName = entity.FullName, + } + ); + } //分配规则 @@ -2962,6 +3055,31 @@ namespace IRaCIS.Core.Infra.EFCore.Common } + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionMark))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as ReadingTaskQuestionMark; + + var answer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(x => x.Entity as ReadingTableQuestionAnswer) + .Where(x => x.RowId == entity.RowId && x.TableQuestionId == entity.TableQuestionId).Select(x => x.Answer).FirstOrDefault(); + + var liverSegmentation = await _dbContext.ReadingTableQuestionAnswer.Where(x => x.RowId == entity.RowId && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.liverSegmentation).Select(x => x.Answer).FirstOrDefaultAsync(); + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + VisitTaskId = entity.VisitTaskId, + + ObjectRelationParentId = entity.VisitTaskId, + + }, new + { + Answer = answer, + LiverSegmentation = liverSegmentation, + }); + } + + //病灶这里操作 ReadingTableAnswerRowInfo ReadingTableQuestionAnswer foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableAnswerRowInfo))) @@ -3283,36 +3401,42 @@ namespace IRaCIS.Core.Infra.EFCore.Common UserRealName = userRealName, }; + + var extraIdentification = string.Empty; + var isDistinctionInterface = true; #region 标识区分 if (type == AuditOpt.Add) { + isDistinctionInterface = false; + //生成一致性分析任务 if (entity.IsSelfAnalysis == true) { - type = type + "/" + "SelfAnalysis"; + extraIdentification = "/SelfAnalysis"; } else if (entity.IsSelfAnalysis == false) { - type = type + "/" + "GroupAnalysis"; + extraIdentification = "/GroupAnalysis"; } else { - type = type + "/" + "NotAnalysis"; + extraIdentification = "/NotAnalysis"; } //区分任务类型 - type = type + "/" + (int)entity.ReadingCategory; + extraIdentification = extraIdentification + "/" + (int)entity.ReadingCategory; } else { + isDistinctionInterface = false; switch (_userInfo.RequestUrl) { //申请重阅 case "VisitTask/applyReReading": - type = type + "/" + (int)entity.ReReadingApplyState; + extraIdentification = "/" + (int)entity.ReReadingApplyState; break; @@ -3321,12 +3445,12 @@ namespace IRaCIS.Core.Infra.EFCore.Common if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM) { - type = type + "/" + 1; + extraIdentification = "/" + 1; } else { - type = type + "/" + 2; + extraIdentification = "/" + 2; } break; @@ -3462,7 +3586,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common { VisitTaskId = x.Id, - IsDistinctionInterface = type == AuditOpt.Update ? true : false, + IsDistinctionInterface = isDistinctionInterface, + + ExtraIndentification = extraIdentification, ObjectRelationParentId = entity.SourceSubjectVisitId != null ? entity.SourceSubjectVisitId : entity.SouceReadModuleId, @@ -3531,9 +3657,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common inspection.CreateUserName = _userInfo.UserName; - inspection.CreateUserRealName = _userInfo.RealName; + inspection.CreateUserRealName = _userInfo.FullName; inspection.RoleName = _userInfo.UserTypeShortName; - inspection.CreateUserId = _userInfo.Id; + inspection.CreateUserId = _userInfo.UserRoleId; inspection.IP = _userInfo.IP; inspection.CreateTime = inspection.CreateTime == default(DateTime) ? DateTime.Now : inspection.CreateTime; @@ -3718,6 +3844,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common /// public string GetInspectionRecordIdentification(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false) { + //var entityType = _dbContext.Model.FindEntityType(entityObj.GetType()); + //var tableName = entityType.GetTableName(); + var entityTypeName = entityObj.GetType().Name; //文档签署这块,不区分系统和项目的 需要处理为同一个标识 diff --git a/IRaCIS.Core.Infra.EFCore/Context/Convention/NoForeignKeyMigrationsSqlGenerator.cs b/IRaCIS.Core.Infra.EFCore/Context/Convention/NoForeignKeyMigrationsSqlGenerator.cs index 642c8c201..941930c99 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/Convention/NoForeignKeyMigrationsSqlGenerator.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/Convention/NoForeignKeyMigrationsSqlGenerator.cs @@ -21,6 +21,7 @@ public class NoForeignKeyMigrationsSqlGenerator : SqlServerMigrationsSqlGenerato protected override void Generate(Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true) { operation.ForeignKeys.Clear(); + base.Generate(operation, model, builder, terminate); } protected override void Generate(AddForeignKeyOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true) @@ -33,18 +34,49 @@ public class NoForeignKeyMigrationsSqlGenerator : SqlServerMigrationsSqlGenerato // 忽略所有删除外键的操作 // 不调用 base.Generate 来跳过生成删除外键的SQL } - ////忽略掉唯一约束,因为dicom Id 的问题 - //protected override void Generate(CreateIndexOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true) - //{ - // // 如果索引是唯一的,则忽略,不生成SQL语句 - // if (operation.IsUnique) - // { - // return; // 跳过唯一约束的索引创建 - // } - // // 如果不是唯一索引,则继续生成 - // base.Generate(operation, model, builder, terminate); - //} + //忽略掉唯一约束 + protected override void Generate(CreateIndexOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true) + { + //// 如果索引是唯一的,则忽略,不生成SQL语句 + //if (operation.IsUnique) + //{ + // return; // 跳过唯一约束的索引创建 + //} + + //// 如果不是唯一索引,则继续生成 + //base.Generate(operation, model, builder, terminate); + + //// 获取表信息 + //var table = model?.FindEntityType(operation.Table); + //if (table != null) + //{ + // // 跳过主键相关的索引(主键索引以主键列构建) + // var primaryKey = table.FindPrimaryKey(); + // if (primaryKey != null && operation.Columns.SequenceEqual(primaryKey.Properties.Select(p => p.Name))) + // { + // base.Generate(operation, model, builder, terminate); + // return; // 生成主键相关的索引 + // } + //} + + // 检查是否是外键索引 + var table = model?.FindEntityType(operation.Table); + if (table != null) + { + foreach (var foreignKey in table.GetForeignKeys()) + { + // 如果索引列和外键列相同,跳过生成 + if (operation.Columns.SequenceEqual(foreignKey.Properties.Select(p => p.Name))) + { + return; // 跳过生成外键索引 + } + } + } + + // 非外键索引,调用基类方法正常生成 + base.Generate(operation, model, builder, terminate); + } diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 99bd4d81f..9f9142c6a 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -3,6 +3,7 @@ using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Infra.EFCore.Common; using IRaCIS.Core.Infrastructure.Encryption; using IRaCIS.Core.Infrastructure.Extention; +using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Newtonsoft.Json; using System.ComponentModel; @@ -77,11 +78,11 @@ public class IRaCISDBContext : DbContext }); modelBuilder.Entity(entity => - { + { //项目术语配置 entity.OwnsMany(x => x.TrialObjectNameList, ownedNavigationBuilder => { - ownedNavigationBuilder.ToJson() ; + ownedNavigationBuilder.ToJson(); }); }); @@ -144,12 +145,60 @@ public class IRaCISDBContext : DbContext base.OnModelCreating(modelBuilder); + //软删除筛选器通常依赖于实体模型的完整定义(例如属性映射、继承关系等) + + + foreach (var entityType in modelBuilder.Model.GetEntityTypes()) { // 软删除配置 if (typeof(ISoftDelete).IsAssignableFrom(entityType.ClrType)) { - entityType.AddSoftDeleteQueryFilter(); + //entityType.AddSoftDeleteQueryFilter(); + + // 动态创建表达式:e => e.IsDeleted==false + var parameter = Expression.Parameter(entityType.ClrType, "e"); + var property = Expression.Property(parameter, nameof(ISoftDelete.IsDeleted)); + var filter = Expression.Lambda( + Expression.Equal(property, Expression.Constant(false)), + parameter); + + // 应用全局查询筛选器 + modelBuilder.Entity(entityType.ClrType).HasQueryFilter(filter); + + //Console.WriteLine($"实体应用软删除:{entityType.ClrType.Name}"); + + } + foreach (var navigation in entityType.GetNavigations()) + { + + if (navigation.IsCollection) continue; + + #region 有问题 + // 比如 e.SourceSubjectVisit.IsDeleted == False 还会导致 dicom 查询增加额外很多的连表 因为访视 项目 项目中心,dicom 都是软删除 + // + //// 配置基于导航属性的软删除查询筛选器 + //if (typeof(ISoftDelete).IsAssignableFrom(navigation.TargetEntityType.ClrType)) + //{ + // var clrType = entityType.ClrType; + // var targetType = navigation.TargetEntityType.ClrType; + + // //e => e.Subject.IsDeleted==false + // var parameterNav = Expression.Parameter(clrType, "e"); + // var navigationProperty = Expression.Property(parameterNav, navigation.Name); + // var navigationFilter = Expression.Equal( + // Expression.Property(navigationProperty, nameof(ISoftDelete.IsDeleted)), + // Expression.Constant(false)); + + // var filterNav = Expression.Lambda(navigationFilter, parameterNav); + + // modelBuilder.Entity(clrType).HasQueryFilter(filterNav); + + // Console.WriteLine($"实体应用软删除:{entityType.ClrType.Name} 导航属性{filterNav}"); + //} + + #endregion + } @@ -375,7 +424,7 @@ public class IRaCISDBContext : DbContext public virtual DbSet VerificationCodes { get; set; } public virtual DbSet MenuFunctions { get; set; } public virtual DbSet UserTypeMenuFunction { get; set; } - public virtual DbSet Users { get; set; } + public virtual DbSet Users { get; set; } public virtual DbSet UserType { get; set; } @@ -398,16 +447,16 @@ public class IRaCISDBContext : DbContext public virtual DbSet TrialDictionary { get; set; } public virtual DbSet TrialDetail { get; set; } - public virtual DbSet UserTrial { get; set; } + public virtual DbSet UserTrial { get; set; } public virtual DbSet ProjectDictionary { get; set; } - public virtual DbSet UserTrialSite { get; set; } + public virtual DbSet UserTrialSite { get; set; } public virtual DbSet TrialSite { get; set; } public virtual DbSet Site { get; set; } - public virtual DbSet User { get; set; } + public virtual DbSet User { get; set; } public virtual DbSet UserPassWordLog { get; set; } @@ -476,12 +525,12 @@ public class IRaCISDBContext : DbContext public virtual DbSet SystemDocument { get; set; } public virtual DbSet TrialDocument { get; set; } public virtual DbSet TrialDocUserTypeConfirm { get; set; } - public virtual DbSet SystemDocConfirmedUser { get; set; } public virtual DbSet SystemDocNeedConfirmedUserType { get; set; } public virtual DbSet TrialDocNeedConfirmedUserType { get; set; } - public virtual DbSet TrialDocConfirmedUser { get; set; } + + #endregion #region 未分类 @@ -581,8 +630,18 @@ public class IRaCISDBContext : DbContext public virtual DbSet EventStoreRecord { get; set; } + public virtual DbSet IdentityUser { get; set; } + public virtual DbSet TrialIdentityUser { get; set; } + + public virtual DbSet SystemDocConfirmedIdentityUser { get; set; } + + public virtual DbSet TrialDocConfirmedIdentityUser { get; set; } + + //public virtual DbSet TrialDocConfirmedUser { get; set; } + //public virtual DbSet SystemDocConfirmedUser { get; set; } + } public class TestLength : Entity @@ -590,7 +649,7 @@ public class TestLength : Entity public string Name { get; set; } [StringLength(1000)] - public string[] StringList { get; set; }=new string[] { }; + public string[] StringList { get; set; } = new string[] { }; public List DateTimeList { get; set; } = new List(); diff --git a/IRaCIS.Core.Infra.EFCore/EntityConfigration/ImageConfigration.cs b/IRaCIS.Core.Infra.EFCore/EntityConfigration/ImageConfigration.cs index 873e12540..2b2d4d63c 100644 --- a/IRaCIS.Core.Infra.EFCore/EntityConfigration/ImageConfigration.cs +++ b/IRaCIS.Core.Infra.EFCore/EntityConfigration/ImageConfigration.cs @@ -13,6 +13,8 @@ public class DicomStudyConfigration : IEntityTypeConfiguration { builder.HasKey(e => e.SeqId); + //builder.HasMany(s => s.InstanceList).WithOne(se => se.DicomStudy).HasForeignKey(se => se.StudyId).HasPrincipalKey(st => st.Id); + builder.HasMany(s => s.SeriesList).WithOne(se => se.DicomStudy).HasForeignKey(se => se.StudyId).HasPrincipalKey(st => st.Id); builder.HasMany(s => s.DicomStudyMonitorList).WithOne(sm => sm.DicomStudy).HasForeignKey(sm => sm.StudyId).HasPrincipalKey(se => se.Id); @@ -40,6 +42,8 @@ public class DicomInstanceConfigration : IEntityTypeConfiguration { builder.HasKey(e => e.SeqId); + builder.HasOne(e => e.DicomStudy).WithMany().HasForeignKey(t=>t.StudyId).HasPrincipalKey(st => st.Id); + builder.HasMany(s => s.ReadingTableAnswerRowInfoList).WithOne(di => di.Instance).HasForeignKey(t => t.InstanceId).HasPrincipalKey(se => se.Id); } @@ -71,6 +75,8 @@ public class TaskInstanceConfigration : IEntityTypeConfiguration public void Configure(EntityTypeBuilder builder) { builder.HasKey(e => e.SeqId); + + builder.HasOne(e => e.TaskStudy).WithMany(t=>t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id); } } @@ -100,6 +106,8 @@ public class SCPInstanceConfigration : IEntityTypeConfiguration public void Configure(EntityTypeBuilder builder) { builder.HasKey(e => e.SeqId); + + builder.HasOne(e => e.SCPStudy).WithMany(t => t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id); } } diff --git a/IRaCIS.Core.Infra.EFCore/EntityConfigration/SubjectConfigration.cs b/IRaCIS.Core.Infra.EFCore/EntityConfigration/SubjectConfigration.cs index e80bf8f1c..75e8cff45 100644 --- a/IRaCIS.Core.Infra.EFCore/EntityConfigration/SubjectConfigration.cs +++ b/IRaCIS.Core.Infra.EFCore/EntityConfigration/SubjectConfigration.cs @@ -44,9 +44,9 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration } } - public class UserConfigration : IEntityTypeConfiguration + public class UserConfigration : IEntityTypeConfiguration { - public void Configure(EntityTypeBuilder builder) + public void Configure(EntityTypeBuilder builder) { //User 和VisitTask 存在一对多的关系 这里不显式配置就报错,why? builder.HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId); @@ -55,9 +55,9 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration } } - public class SystemDocConfirmedUserConfigration : IEntityTypeConfiguration + public class SystemDocConfirmedUserConfigration : IEntityTypeConfiguration { - public void Configure(EntityTypeBuilder builder) + public void Configure(EntityTypeBuilder builder) { #region 不用显示配置 //// 配置 CreateUser 关系 @@ -75,18 +75,45 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration } } - public class TrialUserConfigration : IEntityTypeConfiguration + public class TrialUserConfigration : IEntityTypeConfiguration { //当一个实体,针对同一个类,有两个一对一导航属性,但是是不同的外键,一个外键是一对一,一个是一对多,那么需要显示配置一对多的关系 - public void Configure(EntityTypeBuilder builder) + public void Configure(EntityTypeBuilder builder) { //TrialUser 和User 之间 一对多 (一个用户可以参与多个项目) - builder.HasOne(s => s.User) - .WithMany(t => t.UserTrials) + builder.HasOne(s => s.UserRole) + .WithMany(t => t.UserRoleTrials) .HasForeignKey(s => s.UserId); //TrialUser User 一对一 创建人 } } + public class IdentityUserConfigration : IEntityTypeConfiguration + { + //当一个实体,针对同一个类,有两个一对一导航属性,但是是不同的外键,一个外键是一对一,一个是一对多,那么需要显示配置一对多的关系 + public void Configure(EntityTypeBuilder builder) + { + builder.HasMany(s => s.UserRoleList) + .WithOne(t => t.IdentityUser) + .HasForeignKey(s => s.IdentityUserId); + + + + } + } + + + public class TrialIdentityUserConfigration : IEntityTypeConfiguration + { + //当一个实体,针对同一个类,有两个一对一导航属性,但是是不同的外键,一个外键是一对一,一个是一对多,那么需要显示配置一对多的关系 + public void Configure(EntityTypeBuilder builder) + { + builder.HasMany(s => s.TrialUserRoleList) + .WithOne(t => t.TrialUser) + .HasForeignKey(s => s.TrialUserId); + } + } + + } diff --git a/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs b/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs index a3224346c..ad1ba2867 100644 --- a/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs +++ b/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs @@ -104,14 +104,14 @@ public class AuditEntityInterceptor(IUserInfo _userInfo, if (entry.Entity is IAuditUpdate updateEntity1) { updateEntity1.UpdateTime = DateTime.Now; - updateEntity1.UpdateUserId = _userInfo.Id; + updateEntity1.UpdateUserId = _userInfo.UserRoleId; } if (entry.Entity is ISoftDelete softDelete) { if (softDelete.IsDeleted) { - softDelete.DeleteUserId = _userInfo.Id; + softDelete.DeleteUserId = _userInfo.UserRoleId; softDelete.DeletedTime = DateTime.Now; } else @@ -133,7 +133,7 @@ public class AuditEntityInterceptor(IUserInfo _userInfo, } if (addEntity.CreateUserId == default(Guid)) { - addEntity.CreateUserId = _userInfo.Id; + addEntity.CreateUserId = _userInfo.UserRoleId; } } @@ -141,7 +141,7 @@ public class AuditEntityInterceptor(IUserInfo _userInfo, if (entry.Entity is IAuditUpdate updateEntity) { updateEntity.UpdateTime = DateTime.Now; - updateEntity.UpdateUserId = _userInfo.Id; + updateEntity.UpdateUserId = _userInfo.UserRoleId; } break; } diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241218070518_SPMConfig.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241218070518_SPMConfig.Designer.cs new file mode 100644 index 000000000..6f0865ab4 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241218070518_SPMConfig.Designer.cs @@ -0,0 +1,18211 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241218070518_SPMConfig")] + partial class SPMConfig + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("运维人员与项目关联关系表 - 实体"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUser"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUser"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUser"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUser"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUser"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUser"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241218070518_SPMConfig.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241218070518_SPMConfig.cs new file mode 100644 index 000000000..dfec36f10 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241218070518_SPMConfig.cs @@ -0,0 +1,90 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class SPMConfig : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_DicomInstance_DicomStudy_StudyId", + table: "DicomInstance"); + + migrationBuilder.AddColumn( + name: "CollectImagesEnum", + table: "Trial", + type: "int", + nullable: false, + defaultValue: 0, + comment: "阅片任务产生之前 采集影像"); + + migrationBuilder.AddColumn( + name: "IsSPMJoinReReadingApproval", + table: "Trial", + type: "bit", + nullable: false, + defaultValue: true, + comment: "SPM 参与重阅审批"); + + migrationBuilder.AddColumn( + name: "IsSPMJoinReviewerSelect", + table: "Trial", + type: "bit", + nullable: false, + defaultValue: true, + comment: "SPM 参与阅片人筛选"); + + migrationBuilder.AddColumn( + name: "IsSPMJoinSiteSurvey", + table: "Trial", + type: "bit", + nullable: false, + defaultValue: true, + comment: "SPM 参与中心调研"); + + migrationBuilder.AddForeignKey( + name: "FK_DicomInstance_DicomStudy_StudyId", + table: "DicomInstance", + column: "StudyId", + principalTable: "DicomStudy", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_DicomInstance_DicomStudy_StudyId", + table: "DicomInstance"); + + migrationBuilder.DropColumn( + name: "CollectImagesEnum", + table: "Trial"); + + migrationBuilder.DropColumn( + name: "IsSPMJoinReReadingApproval", + table: "Trial"); + + migrationBuilder.DropColumn( + name: "IsSPMJoinReviewerSelect", + table: "Trial"); + + migrationBuilder.DropColumn( + name: "IsSPMJoinSiteSurvey", + table: "Trial"); + + migrationBuilder.AddForeignKey( + name: "FK_DicomInstance_DicomStudy_StudyId", + table: "DicomInstance", + column: "StudyId", + principalTable: "DicomStudy", + principalColumn: "SeqId", + onDelete: ReferentialAction.Cascade); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241220052713_Hospital.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241220052713_Hospital.Designer.cs new file mode 100644 index 000000000..d7d562761 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241220052713_Hospital.Designer.cs @@ -0,0 +1,18214 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241220052713_Hospital")] + partial class Hospital + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("运维人员与项目关联关系表 - 实体"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUser"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUser"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUser"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUser"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUser"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUser"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241220052713_Hospital.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241220052713_Hospital.cs new file mode 100644 index 000000000..589b3454a --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241220052713_Hospital.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class Hospital : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "IsConfirm", + table: "Hospital", + type: "bit", + nullable: false, + defaultValue: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "IsConfirm", + table: "Hospital"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241220091022_DoctorHospital.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241220091022_DoctorHospital.Designer.cs new file mode 100644 index 000000000..008a319ec --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241220091022_DoctorHospital.Designer.cs @@ -0,0 +1,18243 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241220091022_DoctorHospital")] + partial class DoctorHospital + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("University") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("运维人员与项目关联关系表 - 实体"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUser"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUser"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUser"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUser"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUser"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUser"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241220091022_DoctorHospital.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241220091022_DoctorHospital.cs new file mode 100644 index 000000000..dcaf0289b --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241220091022_DoctorHospital.cs @@ -0,0 +1,149 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class DoctorHospital : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_SCPInstance_SCPStudy_StudyId", + table: "SCPInstance"); + + migrationBuilder.DropForeignKey( + name: "FK_TaskInstance_TaskStudy_StudyId", + table: "TaskInstance"); + + migrationBuilder.DropColumn( + name: "IsConfirm", + table: "Hospital"); + + migrationBuilder.AddColumn( + name: "City", + table: "Doctor", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "CityCN", + table: "Doctor", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "HospitalCN", + table: "Doctor", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "HospitalEn", + table: "Doctor", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "University", + table: "Doctor", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "UniversityCN", + table: "Doctor", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + + migrationBuilder.AddForeignKey( + name: "FK_SCPInstance_SCPStudy_StudyId", + table: "SCPInstance", + column: "StudyId", + principalTable: "SCPStudy", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_TaskInstance_TaskStudy_StudyId", + table: "TaskInstance", + column: "StudyId", + principalTable: "TaskStudy", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_SCPInstance_SCPStudy_StudyId", + table: "SCPInstance"); + + migrationBuilder.DropForeignKey( + name: "FK_TaskInstance_TaskStudy_StudyId", + table: "TaskInstance"); + + migrationBuilder.DropColumn( + name: "City", + table: "Doctor"); + + migrationBuilder.DropColumn( + name: "CityCN", + table: "Doctor"); + + migrationBuilder.DropColumn( + name: "HospitalCN", + table: "Doctor"); + + migrationBuilder.DropColumn( + name: "HospitalEn", + table: "Doctor"); + + migrationBuilder.DropColumn( + name: "University", + table: "Doctor"); + + migrationBuilder.DropColumn( + name: "UniversityCN", + table: "Doctor"); + + migrationBuilder.AddColumn( + name: "IsConfirm", + table: "Hospital", + type: "bit", + nullable: false, + defaultValue: false); + + migrationBuilder.AddForeignKey( + name: "FK_SCPInstance_SCPStudy_StudyId", + table: "SCPInstance", + column: "StudyId", + principalTable: "SCPStudy", + principalColumn: "SeqId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_TaskInstance_TaskStudy_StudyId", + table: "TaskInstance", + column: "StudyId", + principalTable: "TaskStudy", + principalColumn: "SeqId", + onDelete: ReferentialAction.Cascade); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241220091507_Doctord.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241220091507_Doctord.Designer.cs new file mode 100644 index 000000000..0e6538c00 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241220091507_Doctord.Designer.cs @@ -0,0 +1,18243 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241220091507_Doctord")] + partial class Doctord + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("University") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("运维人员与项目关联关系表 - 实体"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUser"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUser"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUser"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUser"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUser"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUser"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241220091507_Doctord.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241220091507_Doctord.cs new file mode 100644 index 000000000..ff0ecd898 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241220091507_Doctord.cs @@ -0,0 +1,38 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class Doctord : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "HospitalEn", + table: "Doctor", + newName: "HospitalNameCN"); + + migrationBuilder.RenameColumn( + name: "HospitalCN", + table: "Doctor", + newName: "HospitalName"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "HospitalNameCN", + table: "Doctor", + newName: "HospitalEn"); + + migrationBuilder.RenameColumn( + name: "HospitalName", + table: "Doctor", + newName: "HospitalCN"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241220094746_doctorf.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241220094746_doctorf.Designer.cs new file mode 100644 index 000000000..3d767c4c8 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241220094746_doctorf.Designer.cs @@ -0,0 +1,18243 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241220094746_doctorf")] + partial class doctorf + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("运维人员与项目关联关系表 - 实体"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUser"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUser"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUser"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUser"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUser"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUser"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241220094746_doctorf.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241220094746_doctorf.cs new file mode 100644 index 000000000..01a05cb2f --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241220094746_doctorf.cs @@ -0,0 +1,38 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class doctorf : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "UniversityCN", + table: "Doctor", + newName: "UniversityAffiliatedCN"); + + migrationBuilder.RenameColumn( + name: "University", + table: "Doctor", + newName: "UniversityAffiliated"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "UniversityAffiliatedCN", + table: "Doctor", + newName: "UniversityCN"); + + migrationBuilder.RenameColumn( + name: "UniversityAffiliated", + table: "Doctor", + newName: "University"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241223050707_UserModify.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241223050707_UserModify.Designer.cs new file mode 100644 index 000000000..fc9c523a4 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241223050707_UserModify.Designer.cs @@ -0,0 +1,18229 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241223050707_UserModify")] + partial class UserModify + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("运维人员与项目关联关系表 - 实体"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsMutiAccountInfoConfirm") + .HasColumnType("bit") + .HasComment("多账号信息是否已经确认"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUser"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUser"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUser"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUser"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUser"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUser"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241223050707_UserModify.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241223050707_UserModify.cs new file mode 100644 index 000000000..6adbc0b5e --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241223050707_UserModify.cs @@ -0,0 +1,112 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class UserModify : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_SCPInstance_SCPStudy_StudyId", + table: "SCPInstance"); + + migrationBuilder.DropForeignKey( + name: "FK_TaskInstance_TaskStudy_StudyId", + table: "TaskInstance"); + + migrationBuilder.AddColumn( + name: "IdentityUserId", + table: "UserPassWordLog", + type: "uniqueidentifier", + nullable: false, + defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); + + migrationBuilder.AddColumn( + name: "IdentityUserId", + table: "User", + type: "uniqueidentifier", + nullable: false, + defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); + + migrationBuilder.AddColumn( + name: "IsMutiAccountInfoConfirm", + table: "User", + type: "bit", + nullable: false, + defaultValue: false, + comment: "多账号信息是否已经确认"); + + migrationBuilder.AddColumn( + name: "IsUserRoleDisabled", + table: "User", + type: "bit", + nullable: false, + defaultValue: false); + + migrationBuilder.AddForeignKey( + name: "FK_SCPInstance_SCPStudy_StudyId", + table: "SCPInstance", + column: "StudyId", + principalTable: "SCPStudy", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_TaskInstance_TaskStudy_StudyId", + table: "TaskInstance", + column: "StudyId", + principalTable: "TaskStudy", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_SCPInstance_SCPStudy_StudyId", + table: "SCPInstance"); + + migrationBuilder.DropForeignKey( + name: "FK_TaskInstance_TaskStudy_StudyId", + table: "TaskInstance"); + + migrationBuilder.DropColumn( + name: "IdentityUserId", + table: "UserPassWordLog"); + + migrationBuilder.DropColumn( + name: "IdentityUserId", + table: "User"); + + migrationBuilder.DropColumn( + name: "IsMutiAccountInfoConfirm", + table: "User"); + + migrationBuilder.DropColumn( + name: "IsUserRoleDisabled", + table: "User"); + + migrationBuilder.AddForeignKey( + name: "FK_SCPInstance_SCPStudy_StudyId", + table: "SCPInstance", + column: "StudyId", + principalTable: "SCPStudy", + principalColumn: "SeqId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_TaskInstance_TaskStudy_StudyId", + table: "TaskInstance", + column: "StudyId", + principalTable: "TaskStudy", + principalColumn: "SeqId", + onDelete: ReferentialAction.Cascade); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241223094453_tablemark.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241223094453_tablemark.Designer.cs new file mode 100644 index 000000000..6537dadad --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241223094453_tablemark.Designer.cs @@ -0,0 +1,18252 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241223094453_tablemark")] + partial class tablemark + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("运维人员与项目关联关系表 - 实体"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUser"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUser"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUser"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUser"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUser"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUser"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241223094453_tablemark.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241223094453_tablemark.cs new file mode 100644 index 000000000..a712df63b --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241223094453_tablemark.cs @@ -0,0 +1,49 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class tablemark : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "RowId", + table: "ReadingTaskQuestionMark", + type: "uniqueidentifier", + nullable: true); + + migrationBuilder.AddColumn( + name: "RowIndex", + table: "ReadingTaskQuestionMark", + type: "uniqueidentifier", + nullable: true); + + migrationBuilder.AddColumn( + name: "TableQuestionId", + table: "ReadingTaskQuestionMark", + type: "uniqueidentifier", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "RowId", + table: "ReadingTaskQuestionMark"); + + migrationBuilder.DropColumn( + name: "RowIndex", + table: "ReadingTaskQuestionMark"); + + migrationBuilder.DropColumn( + name: "TableQuestionId", + table: "ReadingTaskQuestionMark"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241224030556_tablemarkc.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241224030556_tablemarkc.Designer.cs new file mode 100644 index 000000000..8a1ad7ade --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241224030556_tablemarkc.Designer.cs @@ -0,0 +1,18253 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241224030556_tablemarkc")] + partial class tablemarkc + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("运维人员与项目关联关系表 - 实体"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUser"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUser"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUser"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUser"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUser"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUser"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241224030556_tablemarkc.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241224030556_tablemarkc.cs new file mode 100644 index 000000000..c5fc9ff19 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241224030556_tablemarkc.cs @@ -0,0 +1,41 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class tablemarkc : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "RowIndex", + table: "ReadingTaskQuestionMark", + type: "decimal(18,2)", + precision: 18, + scale: 2, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uniqueidentifier", + oldNullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "RowIndex", + table: "ReadingTaskQuestionMark", + type: "uniqueidentifier", + nullable: true, + oldClrType: typeof(decimal), + oldType: "decimal(18,2)", + oldPrecision: 18, + oldScale: 2, + oldNullable: true); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241224082051_AddIdentityUser.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241224082051_AddIdentityUser.Designer.cs new file mode 100644 index 000000000..f38fef7c9 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241224082051_AddIdentityUser.Designer.cs @@ -0,0 +1,18400 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241224082051_AddIdentityUser")] + partial class AddIdentityUser + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("运维人员与项目关联关系表 - 实体"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUser"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUser"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUser"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUser"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUser"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUser"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUser"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUser"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUser"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUser"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUser"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUser"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("UserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241224082051_AddIdentityUser.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241224082051_AddIdentityUser.cs new file mode 100644 index 000000000..9ce76bd03 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241224082051_AddIdentityUser.cs @@ -0,0 +1,132 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class AddIdentityUser : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "IsMutiAccountInfoConfirm", + table: "User"); + + migrationBuilder.AlterTable( + name: "User", + comment: "后台 - 系统账户角色关系表", + oldComment: "后台 - 系统账户"); + + migrationBuilder.AlterColumn( + name: "SuperAdmin", + table: "User", + type: "bit", + nullable: false, + comment: "后续删除", + oldClrType: typeof(bool), + oldType: "bit"); + + migrationBuilder.CreateTable( + name: "IdentityUser", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "int", nullable: false), + UserCode = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + UserName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + EMail = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + EmailToken = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false), + FirstName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + LastName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + Password = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + PasswordChanged = table.Column(type: "bit", nullable: false), + Phone = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + Sex = table.Column(type: "int", nullable: true), + Status = table.Column(type: "int", nullable: false), + OrganizationName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + PositionName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + AutoCutNextTask = table.Column(type: "bit", nullable: false, comment: "自动切换下一个任务"), + DepartmentName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + IsFirstAdd = table.Column(type: "bit", nullable: false, comment: "首次登录需要修改密码"), + IsTestUser = table.Column(type: "bit", nullable: false), + IsZhiZhun = table.Column(type: "bit", nullable: false, comment: "内部用户 外部用户"), + LastChangePassWordTime = table.Column(type: "datetime2", nullable: true, comment: "上一次修改密码的时间"), + LastLoginIP = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), + LastLoginTime = table.Column(type: "datetime2", nullable: true), + CreateUserId = table.Column(type: "uniqueidentifier", nullable: false), + CreateTime = table.Column(type: "datetime2", nullable: false), + UpdateUserId = table.Column(type: "uniqueidentifier", nullable: false), + UpdateTime = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityUser", x => x.Id); + table.ForeignKey( + name: "FK_IdentityUser_User_CreateUserId", + column: x => x.CreateUserId, + principalTable: "User", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }, + comment: "后台 - 系统真实账户表"); + + migrationBuilder.CreateIndex( + name: "IX_User_IdentityUserId", + table: "User", + column: "IdentityUserId"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityUser_CreateUserId", + table: "IdentityUser", + column: "CreateUserId"); + + migrationBuilder.AddForeignKey( + name: "FK_User_IdentityUser_IdentityUserId", + table: "User", + column: "IdentityUserId", + principalTable: "IdentityUser", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_User_IdentityUser_IdentityUserId", + table: "User"); + + migrationBuilder.DropTable( + name: "IdentityUser"); + + migrationBuilder.DropIndex( + name: "IX_User_IdentityUserId", + table: "User"); + + migrationBuilder.AlterTable( + name: "User", + comment: "后台 - 系统账户", + oldComment: "后台 - 系统账户角色关系表"); + + migrationBuilder.AlterColumn( + name: "SuperAdmin", + table: "User", + type: "bit", + nullable: false, + oldClrType: typeof(bool), + oldType: "bit", + oldComment: "后续删除"); + + migrationBuilder.AddColumn( + name: "IsMutiAccountInfoConfirm", + table: "User", + type: "bit", + nullable: false, + defaultValue: false, + comment: "多账号信息是否已经确认"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241225021839_TrialIdentityUser.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241225021839_TrialIdentityUser.Designer.cs new file mode 100644 index 000000000..4a9ed5006 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241225021839_TrialIdentityUser.Designer.cs @@ -0,0 +1,18479 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241225021839_TrialIdentityUser")] + partial class TrialIdentityUser + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany() + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("UserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241225021839_TrialIdentityUser.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241225021839_TrialIdentityUser.cs new file mode 100644 index 000000000..59c4a3014 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241225021839_TrialIdentityUser.cs @@ -0,0 +1,88 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class TrialIdentityUser : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterTable( + name: "TrialUser", + comment: "项目用户角色表", + oldComment: "运维人员与项目关联关系表 - 实体"); + + migrationBuilder.CreateTable( + name: "TrialIdentityUser", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TrialId = table.Column(type: "uniqueidentifier", nullable: false), + IdentityUserId = table.Column(type: "uniqueidentifier", nullable: false), + RemoveTime = table.Column(type: "datetime2", nullable: true), + JoinTime = table.Column(type: "datetime2", nullable: true), + DeleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedTime = table.Column(type: "datetime2", nullable: true), + CreateUserId = table.Column(type: "uniqueidentifier", nullable: false), + CreateTime = table.Column(type: "datetime2", nullable: false), + UpdateUserId = table.Column(type: "uniqueidentifier", nullable: false), + UpdateTime = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TrialIdentityUser", x => x.Id); + table.ForeignKey( + name: "FK_TrialIdentityUser_IdentityUser_IdentityUserId", + column: x => x.IdentityUserId, + principalTable: "IdentityUser", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_TrialIdentityUser_Trial_TrialId", + column: x => x.TrialId, + principalTable: "Trial", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_TrialIdentityUser_User_CreateUserId", + column: x => x.CreateUserId, + principalTable: "User", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }, + comment: "项目用户表"); + + migrationBuilder.CreateIndex( + name: "IX_TrialIdentityUser_CreateUserId", + table: "TrialIdentityUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialIdentityUser_IdentityUserId", + table: "TrialIdentityUser", + column: "IdentityUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialIdentityUser_TrialId", + table: "TrialIdentityUser", + column: "TrialId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TrialIdentityUser"); + + migrationBuilder.AlterTable( + name: "TrialUser", + comment: "运维人员与项目关联关系表 - 实体", + oldComment: "项目用户角色表"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241225042651_TrialSiteUserRoleModify.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241225042651_TrialSiteUserRoleModify.Designer.cs new file mode 100644 index 000000000..75dc08641 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241225042651_TrialSiteUserRoleModify.Designer.cs @@ -0,0 +1,18497 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241225042651_TrialSiteUserRoleModify")] + partial class TrialSiteUserRoleModify + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialUserId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LoginUserId"); + + b.HasIndex("OptUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany() + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LoginUser") + .WithMany() + .HasForeignKey("LoginUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "OptUser") + .WithMany() + .HasForeignKey("OptUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("LoginUser"); + + b.Navigation("OptUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("User") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("UserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241225042651_TrialSiteUserRoleModify.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241225042651_TrialSiteUserRoleModify.cs new file mode 100644 index 000000000..ed9b7f889 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241225042651_TrialSiteUserRoleModify.cs @@ -0,0 +1,61 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class TrialSiteUserRoleModify : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterTable( + name: "TrialSiteUser", + comment: "项目 - 项目中心用户角色关系表", + oldComment: "项目 - 项目中心用户关系表"); + + migrationBuilder.AddColumn( + name: "TrialUserId", + table: "TrialUser", + type: "uniqueidentifier", + nullable: false, + defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); + + migrationBuilder.CreateIndex( + name: "IX_TrialUser_TrialUserId", + table: "TrialUser", + column: "TrialUserId"); + + migrationBuilder.AddForeignKey( + name: "FK_TrialUser_TrialIdentityUser_TrialUserId", + table: "TrialUser", + column: "TrialUserId", + principalTable: "TrialIdentityUser", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_TrialUser_TrialIdentityUser_TrialUserId", + table: "TrialUser"); + + migrationBuilder.DropIndex( + name: "IX_TrialUser_TrialUserId", + table: "TrialUser"); + + migrationBuilder.DropColumn( + name: "TrialUserId", + table: "TrialUser"); + + migrationBuilder.AlterTable( + name: "TrialSiteUser", + comment: "项目 - 项目中心用户关系表", + oldComment: "项目 - 项目中心用户角色关系表"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241226064658_UserlogModifg7.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241226064658_UserlogModifg7.Designer.cs new file mode 100644 index 000000000..98b44e5ab --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241226064658_UserlogModifg7.Designer.cs @@ -0,0 +1,18583 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241226064658_UserlogModifg7")] + partial class UserlogModifg7 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialUserId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TargetIdentityUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany() + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.OwnsOne("IRaCIS.Core.Domain.Models.UserLogJsonObj", "JsonObj", b1 => + { + b1.Property("UserLogId") + .HasColumnType("uniqueidentifier"); + + b1.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("Sex") + .HasColumnType("int"); + + b1.Property("Status") + .HasColumnType("int"); + + b1.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("UserLogId"); + + b1.ToTable("UserLog"); + + b1.ToJson("JsonObj"); + + b1.WithOwner() + .HasForeignKey("UserLogId"); + }); + + b.Navigation("CreateUserRole"); + + b.Navigation("JsonObj") + .IsRequired(); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("UserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241226064658_UserlogModifg7.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241226064658_UserlogModifg7.cs new file mode 100644 index 000000000..763aac6e1 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241226064658_UserlogModifg7.cs @@ -0,0 +1,223 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class UserlogModifg7 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_UserLog_User_LoginUserId", + table: "UserLog"); + + migrationBuilder.DropForeignKey( + name: "FK_UserLog_User_OptUserId", + table: "UserLog"); + + //migrationBuilder.DropIndex( + // name: "IX_UserLog_LoginUserId", + // table: "UserLog"); + + //migrationBuilder.DropIndex( + // name: "IX_UserLog_OptUserId", + // table: "UserLog"); + + migrationBuilder.AlterColumn( + name: "OptUserId", + table: "UserLog", + type: "uniqueidentifier", + nullable: true, + comment: "被操作的人,自己操作的就是自己--后续删除", + oldClrType: typeof(Guid), + oldType: "uniqueidentifier", + oldNullable: true, + oldComment: "被操作的人,自己操作的就是自己"); + + //migrationBuilder.AlterColumn( + // name: "LoginUserId", + // table: "UserLog", + // type: "uniqueidentifier", + // nullable: true, + // comment: "后续删除", + // oldClrType: typeof(Guid), + // oldType: "uniqueidentifier", + // oldNullable: true); + + migrationBuilder.AddColumn( + name: "ActionIdentityUserId", + table: "UserLog", + type: "uniqueidentifier", + nullable: true); + + migrationBuilder.AddColumn( + name: "ActionUserName", + table: "UserLog", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + + //migrationBuilder.AddColumn( + // name: "JsonObj", + // table: "UserLog", + // type: "nvarchar(max)", + // nullable: false, + // defaultValue: ""); + + migrationBuilder.AddColumn( + name: "TargetIdentityUserId", + table: "UserLog", + type: "uniqueidentifier", + nullable: true, + comment: "被操作的对象 admin 修改张三信息 张三是被操作对象"); + + //migrationBuilder.AlterColumn( + // name: "SystemUserId", + // table: "TrialSiteUserSurvey", + // type: "uniqueidentifier", + // nullable: true, + // comment: "IdentityUser 表的用户Id", + // oldClrType: typeof(Guid), + // oldType: "uniqueidentifier", + // oldNullable: true); + + //migrationBuilder.AlterColumn( + // name: "SystemUserId", + // table: "TrialExternalUser", + // type: "uniqueidentifier", + // nullable: false, + // comment: "IdentityUser 表的用户Id", + // oldClrType: typeof(Guid), + // oldType: "uniqueidentifier"); + + //migrationBuilder.AlterColumn( + // name: "AutoCutNextTask", + // table: "IdentityUser", + // type: "bit", + // nullable: false, + // comment: "这个字段废除,放在用户角色上面,后续删除", + // oldClrType: typeof(bool), + // oldType: "bit", + // oldComment: "自动切换下一个任务"); + + //migrationBuilder.CreateIndex( + // name: "IX_UserLog_TargetIdentityUserId", + // table: "UserLog", + // column: "TargetIdentityUserId"); + + //migrationBuilder.AddForeignKey( + // name: "FK_UserLog_IdentityUser_TargetIdentityUserId", + // table: "UserLog", + // column: "TargetIdentityUserId", + // principalTable: "IdentityUser", + // principalColumn: "Id"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_UserLog_IdentityUser_TargetIdentityUserId", + table: "UserLog"); + + migrationBuilder.DropIndex( + name: "IX_UserLog_TargetIdentityUserId", + table: "UserLog"); + + migrationBuilder.DropColumn( + name: "ActionIdentityUserId", + table: "UserLog"); + + migrationBuilder.DropColumn( + name: "ActionUserName", + table: "UserLog"); + + migrationBuilder.DropColumn( + name: "JsonObj", + table: "UserLog"); + + migrationBuilder.DropColumn( + name: "TargetIdentityUserId", + table: "UserLog"); + + migrationBuilder.AlterColumn( + name: "OptUserId", + table: "UserLog", + type: "uniqueidentifier", + nullable: true, + comment: "被操作的人,自己操作的就是自己", + oldClrType: typeof(Guid), + oldType: "uniqueidentifier", + oldNullable: true, + oldComment: "被操作的人,自己操作的就是自己--后续删除"); + + migrationBuilder.AlterColumn( + name: "LoginUserId", + table: "UserLog", + type: "uniqueidentifier", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uniqueidentifier", + oldNullable: true, + oldComment: "后续删除"); + + migrationBuilder.AlterColumn( + name: "SystemUserId", + table: "TrialSiteUserSurvey", + type: "uniqueidentifier", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uniqueidentifier", + oldNullable: true, + oldComment: "IdentityUser 表的用户Id"); + + migrationBuilder.AlterColumn( + name: "SystemUserId", + table: "TrialExternalUser", + type: "uniqueidentifier", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uniqueidentifier", + oldComment: "IdentityUser 表的用户Id"); + + migrationBuilder.AlterColumn( + name: "AutoCutNextTask", + table: "IdentityUser", + type: "bit", + nullable: false, + comment: "自动切换下一个任务", + oldClrType: typeof(bool), + oldType: "bit", + oldComment: "这个字段废除,放在用户角色上面,后续删除"); + + migrationBuilder.CreateIndex( + name: "IX_UserLog_LoginUserId", + table: "UserLog", + column: "LoginUserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserLog_OptUserId", + table: "UserLog", + column: "OptUserId"); + + migrationBuilder.AddForeignKey( + name: "FK_UserLog_User_LoginUserId", + table: "UserLog", + column: "LoginUserId", + principalTable: "User", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_UserLog_User_OptUserId", + table: "UserLog", + column: "OptUserId", + principalTable: "User", + principalColumn: "Id"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241230033246_UserLogAddUserType.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241230033246_UserLogAddUserType.Designer.cs new file mode 100644 index 000000000..fbe8a592a --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241230033246_UserLogAddUserType.Designer.cs @@ -0,0 +1,18533 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241230033246_UserLogAddUserType")] + partial class UserLogAddUserType + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialUserId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + b.HasIndex("ActionIdentityUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TargetIdentityUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.Navigation("ActionIdentityUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241230033246_UserLogAddUserType.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241230033246_UserLogAddUserType.cs new file mode 100644 index 000000000..8d60d9d5a --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241230033246_UserLogAddUserType.cs @@ -0,0 +1,50 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class UserLogAddUserType : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ActionUserType", + table: "UserLog", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + + migrationBuilder.CreateIndex( + name: "IX_UserLog_ActionIdentityUserId", + table: "UserLog", + column: "ActionIdentityUserId"); + + migrationBuilder.AddForeignKey( + name: "FK_UserLog_IdentityUser_ActionIdentityUserId", + table: "UserLog", + column: "ActionIdentityUserId", + principalTable: "IdentityUser", + principalColumn: "Id"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_UserLog_IdentityUser_ActionIdentityUserId", + table: "UserLog"); + + migrationBuilder.DropIndex( + name: "IX_UserLog_ActionIdentityUserId", + table: "UserLog"); + + migrationBuilder.DropColumn( + name: "ActionUserType", + table: "UserLog"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241230062908_SignDoc.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241230062908_SignDoc.Designer.cs new file mode 100644 index 000000000..2b93af9bd --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241230062908_SignDoc.Designer.cs @@ -0,0 +1,18688 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241230062908_SignDoc")] + partial class SignDoc + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedIdentityUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialUserId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + b.HasIndex("ActionIdentityUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TargetIdentityUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ConfirmUser") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany() + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany() + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialIdentityUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.Navigation("ActionIdentityUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialIdentityUserList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserRoleList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241230062908_SignDoc.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241230062908_SignDoc.cs new file mode 100644 index 000000000..6a8ca397b --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241230062908_SignDoc.cs @@ -0,0 +1,134 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class SignDoc : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "SystemDocConfirmedIdentityUser", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SystemDocumentId = table.Column(type: "uniqueidentifier", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + ConfirmUserId = table.Column(type: "uniqueidentifier", nullable: false), + SignFirstViewTime = table.Column(type: "datetime2", nullable: true), + SignText = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false), + CreateUserId = table.Column(type: "uniqueidentifier", nullable: false), + CreateTime = table.Column(type: "datetime2", nullable: false), + DeleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_SystemDocConfirmedIdentityUser", x => x.Id); + table.ForeignKey( + name: "FK_SystemDocConfirmedIdentityUser_IdentityUser_ConfirmUserId", + column: x => x.ConfirmUserId, + principalTable: "IdentityUser", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_SystemDocConfirmedIdentityUser_SystemDocument_SystemDocumentId", + column: x => x.SystemDocumentId, + principalTable: "SystemDocument", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_SystemDocConfirmedIdentityUser_User_CreateUserId", + column: x => x.CreateUserId, + principalTable: "User", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }, + comment: "后台 - 系统文档签署记录"); + + migrationBuilder.CreateTable( + name: "TrialDocConfirmedIdentityUser", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TrialDocumentId = table.Column(type: "uniqueidentifier", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + ConfirmUserId = table.Column(type: "uniqueidentifier", nullable: false), + SignFirstViewTime = table.Column(type: "datetime2", nullable: true), + SignText = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false), + CreateUserId = table.Column(type: "uniqueidentifier", nullable: false), + CreateTime = table.Column(type: "datetime2", nullable: false), + DeleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_TrialDocConfirmedIdentityUser", x => x.Id); + table.ForeignKey( + name: "FK_TrialDocConfirmedIdentityUser_IdentityUser_ConfirmUserId", + column: x => x.ConfirmUserId, + principalTable: "IdentityUser", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_TrialDocConfirmedIdentityUser_TrialDocument_TrialDocumentId", + column: x => x.TrialDocumentId, + principalTable: "TrialDocument", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_TrialDocConfirmedIdentityUser_User_CreateUserId", + column: x => x.CreateUserId, + principalTable: "User", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedIdentityUser_ConfirmUserId", + table: "SystemDocConfirmedIdentityUser", + column: "ConfirmUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedIdentityUser_CreateUserId", + table: "SystemDocConfirmedIdentityUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedIdentityUser_SystemDocumentId", + table: "SystemDocConfirmedIdentityUser", + column: "SystemDocumentId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedIdentityUser_ConfirmUserId", + table: "TrialDocConfirmedIdentityUser", + column: "ConfirmUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedIdentityUser_CreateUserId", + table: "TrialDocConfirmedIdentityUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedIdentityUser_TrialDocumentId", + table: "TrialDocConfirmedIdentityUser", + column: "TrialDocumentId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SystemDocConfirmedIdentityUser"); + + migrationBuilder.DropTable( + name: "TrialDocConfirmedIdentityUser"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241230075945_tableDefaultValue.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241230075945_tableDefaultValue.Designer.cs new file mode 100644 index 000000000..3b583e070 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241230075945_tableDefaultValue.Designer.cs @@ -0,0 +1,18547 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20241230075945_tableDefaultValue")] + partial class tableDefaultValue + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedUser", t => + { + t.HasComment("项目 - 项目文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialUserId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + b.HasIndex("ActionIdentityUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TargetIdentityUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialIdentityUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.Navigation("ActionIdentityUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialIdentityUserList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserRoleList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241230075945_tableDefaultValue.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241230075945_tableDefaultValue.cs new file mode 100644 index 000000000..95b5943ad --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241230075945_tableDefaultValue.cs @@ -0,0 +1,44 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class tableDefaultValue : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "DefaultValue", + table: "ReadingTableQuestionTrial", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: "", + comment: "默认值"); + + migrationBuilder.AddColumn( + name: "DefaultValue", + table: "ReadingTableQuestionSystem", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: "", + comment: "默认值"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "DefaultValue", + table: "ReadingTableQuestionTrial"); + + migrationBuilder.DropColumn( + name: "DefaultValue", + table: "ReadingTableQuestionSystem"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250102070213_CDISCCode.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250102070213_CDISCCode.Designer.cs new file mode 100644 index 000000000..0c5d3b90a --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250102070213_CDISCCode.Designer.cs @@ -0,0 +1,18554 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20250102070213_CDISCCode")] + partial class CDISCCode + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedIdentityUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialUserId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + b.HasIndex("ActionIdentityUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TargetIdentityUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialIdentityUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.Navigation("ActionIdentityUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialIdentityUserList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserRoleList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250102070213_CDISCCode.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250102070213_CDISCCode.cs new file mode 100644 index 000000000..d03e92aa4 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250102070213_CDISCCode.cs @@ -0,0 +1,159 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class CDISCCode : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SystemDocConfirmedUser"); + + migrationBuilder.DropTable( + name: "TrialDocConfirmedUser"); + + migrationBuilder.AddColumn( + name: "CDISCCode", + table: "ReadingTableQuestionTrial", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "CDISCCode", + table: "ReadingQuestionTrial", + type: "nvarchar(400)", + maxLength: 400, + nullable: false, + defaultValue: ""); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "CDISCCode", + table: "ReadingTableQuestionTrial"); + + migrationBuilder.DropColumn( + name: "CDISCCode", + table: "ReadingQuestionTrial"); + + migrationBuilder.CreateTable( + name: "SystemDocConfirmedUser", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ConfirmUserId = table.Column(type: "uniqueidentifier", nullable: false), + CreateUserId = table.Column(type: "uniqueidentifier", nullable: false), + SystemDocumentId = table.Column(type: "uniqueidentifier", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + CreateTime = table.Column(type: "datetime2", nullable: false), + DeleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + DeletedTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + SignFirstViewTime = table.Column(type: "datetime2", nullable: true), + SignText = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SystemDocConfirmedUser", x => x.Id); + table.ForeignKey( + name: "FK_SystemDocConfirmedUser_SystemDocument_SystemDocumentId", + column: x => x.SystemDocumentId, + principalTable: "SystemDocument", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_SystemDocConfirmedUser_User_ConfirmUserId", + column: x => x.ConfirmUserId, + principalTable: "User", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_SystemDocConfirmedUser_User_CreateUserId", + column: x => x.CreateUserId, + principalTable: "User", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }, + comment: "后台 - 系统文档签署记录"); + + migrationBuilder.CreateTable( + name: "TrialDocConfirmedUser", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ConfirmUserId = table.Column(type: "uniqueidentifier", nullable: false), + CreateUserId = table.Column(type: "uniqueidentifier", nullable: false), + TrialDocumentId = table.Column(type: "uniqueidentifier", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + CreateTime = table.Column(type: "datetime2", nullable: false), + DeleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + DeletedTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + SignFirstViewTime = table.Column(type: "datetime2", nullable: true), + SignText = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TrialDocConfirmedUser", x => x.Id); + table.ForeignKey( + name: "FK_TrialDocConfirmedUser_TrialDocument_TrialDocumentId", + column: x => x.TrialDocumentId, + principalTable: "TrialDocument", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_TrialDocConfirmedUser_User_ConfirmUserId", + column: x => x.ConfirmUserId, + principalTable: "User", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_TrialDocConfirmedUser_User_CreateUserId", + column: x => x.CreateUserId, + principalTable: "User", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }, + comment: "项目 - 项目文档签署记录"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedUser_ConfirmUserId", + table: "SystemDocConfirmedUser", + column: "ConfirmUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedUser_CreateUserId", + table: "SystemDocConfirmedUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_SystemDocConfirmedUser_SystemDocumentId", + table: "SystemDocConfirmedUser", + column: "SystemDocumentId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedUser_ConfirmUserId", + table: "TrialDocConfirmedUser", + column: "ConfirmUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedUser_CreateUserId", + table: "TrialDocConfirmedUser", + column: "CreateUserId"); + + migrationBuilder.CreateIndex( + name: "IX_TrialDocConfirmedUser_TrialDocumentId", + table: "TrialDocConfirmedUser", + column: "TrialDocumentId"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250109091126_markinfo02.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250109091126_markinfo02.Designer.cs new file mode 100644 index 000000000..50059c5b0 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250109091126_markinfo02.Designer.cs @@ -0,0 +1,18554 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20250109091126_markinfo02")] + partial class markinfo02 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportIdentification") + .HasColumnType("int") + .HasComment("导出标识"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedIdentityUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialUserId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + b.HasIndex("ActionIdentityUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TargetIdentityUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialIdentityUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.Navigation("ActionIdentityUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialIdentityUserList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserRoleList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250109091126_markinfo02.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250109091126_markinfo02.cs new file mode 100644 index 000000000..520e7d34b --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250109091126_markinfo02.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class markinfo02 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "FirstAddTaskId", + table: "ReadingTaskQuestionMark", + newName: "FristAddTaskId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "FristAddTaskId", + table: "ReadingTaskQuestionMark", + newName: "FirstAddTaskId"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250113032403_ExportIdentification.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250113032403_ExportIdentification.Designer.cs new file mode 100644 index 000000000..6b0d4ae10 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250113032403_ExportIdentification.Designer.cs @@ -0,0 +1,18538 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20250113032403_ExportIdentification")] + partial class ExportIdentification + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedIdentityUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialUserId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + b.HasIndex("ActionIdentityUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TargetIdentityUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialIdentityUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.Navigation("ActionIdentityUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialIdentityUserList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserRoleList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250113032403_ExportIdentification.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250113032403_ExportIdentification.cs new file mode 100644 index 000000000..296540b9a --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250113032403_ExportIdentification.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class ExportIdentification : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ExportIdentification", + table: "ReadingTableQuestionTrial"); + + migrationBuilder.DropColumn( + name: "ExportIdentification", + table: "ReadingTableQuestionSystem"); + + migrationBuilder.DropColumn( + name: "ExportIdentification", + table: "ReadingQuestionTrial"); + + migrationBuilder.DropColumn( + name: "ExportIdentification", + table: "ReadingQuestionSystem"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ExportIdentification", + table: "ReadingTableQuestionTrial", + type: "int", + nullable: true, + comment: "导出标识"); + + migrationBuilder.AddColumn( + name: "ExportIdentification", + table: "ReadingTableQuestionSystem", + type: "int", + nullable: true, + comment: "导出标识"); + + migrationBuilder.AddColumn( + name: "ExportIdentification", + table: "ReadingQuestionTrial", + type: "int", + nullable: true, + comment: "导出标识"); + + migrationBuilder.AddColumn( + name: "ExportIdentification", + table: "ReadingQuestionSystem", + type: "int", + nullable: true, + comment: "导出标识"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250113065326_CriterionGroup.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250113065326_CriterionGroup.cs new file mode 100644 index 000000000..7dae81d3f --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250113065326_CriterionGroup.cs @@ -0,0 +1,40 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class CriterionGroup11 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "CriterionGroup", + table: "ReadingQuestionCriterionTrial", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "CriterionGroup", + table: "ReadingQuestionCriterionSystem", + type: "int", + nullable: false, + defaultValue: 0); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "CriterionGroup", + table: "ReadingQuestionCriterionTrial"); + + migrationBuilder.DropColumn( + name: "CriterionGroup", + table: "ReadingQuestionCriterionSystem"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250113080339_UserlogIsLoginUncommonly.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250113080339_UserlogIsLoginUncommonly.Designer.cs new file mode 100644 index 000000000..b0d735279 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250113080339_UserlogIsLoginUncommonly.Designer.cs @@ -0,0 +1,18548 @@ +// +using System; +using IRaCIS.Core.Infra.EFCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + [DbContext(typeof(IRaCISDBContext))] + [Migration("20250113080339_UserlogIsLoginUncommonly")] + partial class UserlogIsLoginUncommonly + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("编码"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsOfficial") + .HasColumnType("bit") + .HasComment("是否正式简历"); + + b.Property("Language") + .HasColumnType("int") + .HasComment("1 中文 2为英文"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型名"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("Attachment", t => + { + t.HasComment("医生 - 简历|证书 文档表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CROCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CROName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CRONameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit") + .HasComment("是否是项目级别"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CROCompany", t => + { + t.HasComment("机构 - CRO"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRCNeedReply") + .HasColumnType("bit") + .HasComment("CRC是否需要回复 前端使用"); + + b.Property("ParamInfo") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("核查的检查信息Json"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserTypeEnum") + .HasColumnType("int") + .HasComment("核查过程中的操作用户类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("CheckChallengeDialog", t => + { + t.HasComment("一致性核查 - 对话记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowIndex") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalAnswerRowInfo", t => + { + t.HasComment("受试者 - 临床表单表格问题行记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetEnum") + .HasColumnType("int") + .HasComment("枚举(字典里面取的)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalDataSystemSet", t => + { + t.HasComment("系统 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("ClinicalDataSetEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalDataSetName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ClinicalUploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionEnumListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsApply") + .HasColumnType("bit") + .HasComment("是否应用"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadRole") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemClinicalDataSetId"); + + b.HasIndex("TrialId"); + + b.ToTable("ClinicalDataTrialSet", t => + { + t.HasComment("项目 - 临床数据适应标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CheckDate") + .HasColumnType("datetime2") + .HasComment("检查日期"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ClinicalForm", t => + { + t.HasComment("受试者 - 临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ClinicalQuestionAnswer", t => + { + t.HasComment("受试者 - 临床表单问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题Id"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier") + .HasComment("答案行的Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("RowId"); + + b.ToTable("ClinicalTableAnswer", t => + { + t.HasComment("受试者 - 临床表单表格问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("系统标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeEnum") + .HasColumnType("int") + .HasComment("类型-上传|导出|邮件附件"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CommonDocument", t => + { + t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.ToTable("CriterionNidusSystem", t => + { + t.HasComment("系统标准 - 病灶器官表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LesionType") + .HasColumnType("int"); + + b.Property("OrganType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("CriterionNidusTrial", t => + { + t.HasComment("项目标准 - 病灶器官表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BatchId") + .HasColumnType("uniqueidentifier") + .HasComment("批次Id"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("子类"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("创建人姓名"); + + b.Property("CreateUserRealName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片医生"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("被稽查实体名"); + + b.Property("GeneralId") + .HasColumnType("uniqueidentifier") + .HasComment("要稽查对象Id"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("IsFrontAdd") + .HasColumnType("bit") + .HasComment("是否是前端添加"); + + b.Property("IsSign") + .HasColumnType("bit"); + + b.Property("JsonDetail") + .HasColumnType("nvarchar(max)"); + + b.Property("LastJsonDetail") + .HasColumnType("nvarchar(max)") + .HasComment("上一条json"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId") + .HasColumnType("uniqueidentifier") + .HasComment("被稽查对象外键1"); + + b.Property("ObjectRelationParentId2") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectRelationParentId3") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父ID"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("角色名称"); + + b.Property("SignId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("DataInspection", t => + { + t.HasComment("稽查 - 记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomInstance", t => + { + t.HasComment("归档 - Instance表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("DicomSeries", t => + { + t.HasComment("归档 - 序列表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasComment("序列Id 避免内存移动"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDoubleReview") + .HasColumnType("bit"); + + b.Property("IsFromPACS") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("DicomTag.StudyID"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadedTime") + .HasColumnType("datetime2") + .HasComment("上传时间"); + + b.Property("Uploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataTypeEnum") + .HasColumnType("int") + .HasComment("字典类型- 枚举|bool|下拉框"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("是否字典类型配置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigTypeId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("Dictionary", t => + { + t.HasComment("后台 - 字典表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptingNewTrial") + .HasColumnType("bit"); + + b.Property("ActivelyReading") + .HasColumnType("bit"); + + b.Property("AdminComment") + .HasColumnType("nvarchar(max)"); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("AuditUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BankNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankPhoneNum") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindPublications") + .HasColumnType("nvarchar(max)"); + + b.Property("ChineseName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CooperateStatus") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DepartmentOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("GCP") + .HasColumnType("int"); + + b.Property("GCPAgencies") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GCPId") + .HasColumnType("uniqueidentifier"); + + b.Property("GCPTime") + .HasColumnType("datetime2"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Introduction") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Nation") + .HasColumnType("int"); + + b.Property("OpeningBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherClinicalExperience") + .HasColumnType("nvarchar(max)"); + + b.Property("OtherClinicalExperienceCN") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhotoPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Physician") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhysicianId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("PositionOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("RankOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOther") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingTypeOtherCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ResumePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ResumeStatus") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .HasColumnType("int"); + + b.Property("ReviewerCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("SpecialityId") + .HasColumnType("uniqueidentifier"); + + b.Property("SpecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SpecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOther") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SubspecialityOtherCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WeChat") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WorkPartTime") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkPartTimeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("HospitalId"); + + b.HasIndex("PositionId"); + + b.HasIndex("RankId"); + + b.HasIndex("SpecialityId"); + + b.ToTable("Doctor", t => + { + t.HasComment("医生 - 基础信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileType") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsIRUpload") + .HasColumnType("bit") + .HasComment("是否是IR上传"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorCriterionFile", t => + { + t.HasComment("医生 - 项目标准签名文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("DoctorId"); + + b.ToTable("DoctorDictionary", t => + { + t.HasComment("医生 - 医生字典关联表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsMain") + .HasColumnType("bit"); + + b.Property("Summarize") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SummarizeEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorSummarize", t => + { + t.HasComment("医生 - 概述"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DegreeCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Organization") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Education", t => + { + t.HasComment("医生 - 教育信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int") + .HasComment("业务级别"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int") + .HasComment("业务模块"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int") + .HasComment("业务场景"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int") + .HasComment("标准枚举"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送周期"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int") + .HasComment("加急枚举"); + + b.Property("IsAutoSend") + .HasColumnType("bit") + .HasComment("是否自动发送"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit") + .HasComment("是否区分标准"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit") + .HasComment("是否需要回执"); + + b.Property("SystemLevel") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EmailNoticeConfig", t => + { + t.HasComment("后台 - 邮件配置表表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmailNoticeConfigId"); + + b.ToTable("EmailNoticeUserType", t => + { + t.HasComment("后台 - 邮件配置用户类型表(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("Adjudication24H") + .HasColumnType("int"); + + b.Property("Adjudication48H") + .HasColumnType("int"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AttachmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier") + .HasComment("生成账号 加入到项目中后 赋值"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("EnrollTime") + .HasColumnType("datetime2"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollTime") + .HasColumnType("datetime2"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("ReviewerReadingType") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("Timepoint24H") + .HasColumnType("int"); + + b.Property("Timepoint48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("Enroll", t => + { + t.HasComment("医生 - 入组项目中间记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollStatus") + .HasColumnType("int"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId"); + + b.HasIndex("TrialDetailId"); + + b.ToTable("EnrollDetail", t => + { + t.HasComment("医生 - 入组项目流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingCategory") + .HasColumnType("int"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCategory", t => + { + t.HasComment("医生 - 项目阅片标准阅片类型配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinAnalysis") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EnrollId"); + + b.ToTable("EnrollReadingCriterion", t => + { + t.HasComment("医生 - 项目阅片标准参与一致性分析配置表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventState") + .HasColumnType("int"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("完整的事件类型名"); + + b.Property("EventTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("简单的事件类型名"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("EventStoreRecord", t => + { + t.HasComment("记录触发的事件,以及状态,从而方便重试操作"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExchangeRate", t => + { + t.HasComment("医生计费 - 汇率"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DownloadUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ExploreType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ExploreRecommend", t => + { + t.HasComment("后台 - 浏览器推荐 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildDataEnLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChildDataLabel") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端渲染数组 数组名 和数组值"); + + b.Property("ChildDataValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("子数据Value"); + + b.Property("ChildrenTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了"); + + b.Property("CodeEn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ConfigType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端使用 C M"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("前端展示类型 Router, Array,Table"); + + b.Property("DateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("日期格式"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("翻译的字典名(单个字段翻译的时候)"); + + b.Property("DictionaryKey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典名称-待废弃核查"); + + b.Property("DictionaryType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("枚举字典Type"); + + b.Property("EnumType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("后端翻译的类型 对应前端界面 Dictionary Date"); + + b.Property("ForeignKeyEnText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ForeignKeyTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键表"); + + b.Property("ForeignKeyText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Text"); + + b.Property("ForeignKeyValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("外键Value"); + + b.Property("Identification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标识"); + + b.Property("InterfaceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("接口名"); + + b.Property("IsConfig") + .HasColumnType("bit") + .HasComment("未知是否有用-废弃核查"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFinish") + .HasColumnType("bit") + .HasComment("是否完成"); + + b.Property("IsHaveReason") + .HasColumnType("bit") + .HasComment("是否有原因"); + + b.Property("IsHaveSign") + .HasColumnType("bit") + .HasComment("是否有签名"); + + b.Property("IsJoinPlan") + .HasColumnType("bit") + .HasComment("是否加入计划"); + + b.Property("IsShowByTrialConfig") + .HasColumnType("bit") + .HasComment("待废弃核查"); + + b.Property("IsShowParent") + .HasColumnType("int"); + + b.Property("IsSpecialType") + .HasColumnType("bit") + .HasComment("是否为特殊类型"); + + b.Property("ModuleTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ObjectTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TableConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("TrialConfigRelyFieldName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("待废弃核查"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UrlConfigJsonStr") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("FrontAuditConfig", t => + { + t.HasComment("稽查 - 配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier") + .HasComment("中心Id"); + + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.ToTable("Hospital", t => + { + t.HasComment("机构 - 医院"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ImageShare", t => + { + t.HasComment("影像 - 影像分享记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RelativePath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("InspectionFile", t => + { + t.HasComment("一致性核查文件"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FrontType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InternationalizationType") + .HasColumnType("int"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishLogId") + .HasColumnType("uniqueidentifier") + .HasComment("关联版本历史记录表Id"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 1 2 预翻译 已确认 废除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishLogId"); + + b.ToTable("Internationalization", t => + { + t.HasComment("后台 - 国际化配置表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApiPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("Api 接口地址"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("组件路径"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCache") + .HasColumnType("bit"); + + b.Property("IsDisplay") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("启用 禁用"); + + b.Property("IsExternalLink") + .HasColumnType("bit"); + + b.Property("IsInTabDisplay") + .HasColumnType("bit"); + + b.Property("LanguageMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuIcon") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MenuType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型(M目录 C菜单 F按钮 L链接)"); + + b.Property("Meta") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("上级菜单"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("路由地址"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("权限点"); + + b.Property("Redirect") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Menu", t => + { + t.HasComment("后台 - 系统菜单 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BodyPart") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("ImageDate") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadVideoTime") + .HasColumnType("datetime2"); + + b.Property("VideoName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoObjectName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VideoUrl") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("NoneDicomStudy", t => + { + t.HasComment("影像 - 非dicom检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoneDicomStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("OriginNoneDicomStudyId") + .HasColumnType("uniqueidentifier") + .HasComment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NoneDicomStudyId"); + + b.HasIndex("OriginNoneDicomStudyId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("NoneDicomStudyFile", t => + { + t.HasComment("影像 - 非dicom检查关联文件表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("OrganInfo", t => + { + t.HasComment("后台 - 系统标准器官 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Classification") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类"); + + b.Property("ClassificationEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类 英文"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit") + .HasComment("是否可编辑位置"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsLymphNodes") + .HasColumnType("int") + .HasComment("是否是淋巴结"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OrganType") + .HasColumnType("int") + .HasComment("器官类型"); + + b.Property("Part") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位"); + + b.Property("PartEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("部位 英文"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("序号"); + + b.Property("TULAT") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置"); + + b.Property("TULATEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("位置 英文"); + + b.Property("TULOC") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官"); + + b.Property("TULOCEN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("TULOC 器官 英文"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("标准Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OrganInfoId"); + + b.ToTable("OrganTrialInfo", t => + { + t.HasComment("项目标准 - 器官"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CalculateTime") + .HasColumnType("datetime2"); + + b.Property("CalculateUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Payment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("AdjustmentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("YearMonthDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentAdjustment", t => + { + t.HasComment("医生计费 - 每月支付记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasePrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExchangeRate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentCNY") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PaymentUSD") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PersonalAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowCodeOrder") + .HasColumnType("int"); + + b.Property("ShowTypeOrder") + .HasColumnType("int"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PaymentDetail", t => + { + t.HasComment("医生计费 - 每月支付详情表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("date"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CountryCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Hospital") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Major") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MajorCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProvinceCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("School") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SchoolCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Training") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrainingCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Postgraduate", t => + { + t.HasComment("医生 - 继续教育经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("int"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousHistory", t => + { + t.HasComment("受试者访视 - 既往放疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsPD") + .HasColumnType("bit"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TreatmentType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousOther", t => + { + t.HasComment("受试者访视 - 既往其他治疗史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalLevel") + .HasColumnType("int") + .HasComment("临床级别"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataType") + .HasColumnType("int") + .HasComment("数据类型"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsVisist") + .HasColumnType("bit"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadType") + .HasColumnType("int") + .HasComment("上传方式"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousPDF", t => + { + t.HasComment("受试者访视 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsSubjectLevel") + .HasColumnType("bit"); + + b.Property("OperationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("PreviousSurgery", t => + { + t.HasComment("受试者访视 - 既往手术史"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCurrentVersion") + .HasColumnType("bit"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int") + .HasComment("0 开发中 ,已发布"); + + b.Property("UpdateContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Version_US") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("PublishLog", t => + { + t.HasComment("后台 - 系统发布日志 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ChallengeCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CloseResonEnum") + .HasColumnType("int"); + + b.Property("ClosedTime") + .HasColumnType("datetime2"); + + b.Property("ClosedUser") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1200) + .HasColumnType("nvarchar(1200)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int"); + + b.Property("DeadlineTime") + .HasColumnType("datetime2"); + + b.Property("IsClosed") + .HasColumnType("bit"); + + b.Property("LatestMsgTime") + .HasColumnType("datetime2"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("ReUploadUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReUploadedTime") + .HasColumnType("datetime2"); + + b.Property("ReUploader") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReuploadEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallenge", t => + { + t.HasComment("受试者访视 - QC质疑"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QCChallengeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TalkContent") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QCChallengeId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("QCChallengeDialog", t => + { + t.HasComment("受试者访视 - QC质疑对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("QCQuestion", t => + { + t.HasComment("后台 - QC质控问题(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("RankPrice", t => + { + t.HasComment("医生计费 - 不同时间点价格设置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsCRCApplicationRevoke") + .HasColumnType("bit") + .HasComment("CRC是否正在申请撤回"); + + b.Property("IsCRCConfirm") + .HasColumnType("bit"); + + b.Property("IsClinicalDataBlind") + .HasColumnType("bit") + .HasComment("临床数据是否盲化"); + + b.Property("IsClinicalDataComplete") + .HasColumnType("bit") + .HasComment("临床数据是否完整"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsNotNeedPMConfirm") + .HasColumnType("bit"); + + b.Property("IsPMConfirm") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("ModuleName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("模块名称"); + + b.Property("ModuleType") + .HasColumnType("int") + .HasComment("模块类型"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片计划ID"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("ReadModule", t => + { + t.HasComment("读片模块"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalFormId") + .HasColumnType("uniqueidentifier") + .HasComment("表单Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalFormId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadModuleId"); + + b.ToTable("ReadModuleCriterionFrom", t => + { + t.HasComment("受试者 - 阅片模块临床表单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingClinicalData", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingClinicalDataId"); + + b.ToTable("ReadingClinicalDataPDF", t => + { + t.HasComment("项目的临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalDataTrialSetId") + .HasColumnType("uniqueidentifier") + .HasComment("临床数据类型Id"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("IsBlind") + .HasColumnType("bit") + .HasComment("是否盲化"); + + b.Property("IsComplete") + .HasColumnType("bit") + .HasComment("是否完整"); + + b.Property("IsSign") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsVisit") + .HasColumnType("bit") + .HasComment("是否为访视"); + + b.Property("ReadingClinicalDataState") + .HasColumnType("int") + .HasComment("临床数据状态"); + + b.Property("ReadingId") + .HasColumnType("uniqueidentifier") + .HasComment("访视Id 或者模块Id"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("ClinicalDataTrialSetId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingConsistentClinicalData", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ReadingConsistentClinicalDataId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片临床数据ID"); + + b.Property("Size") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingConsistentClinicalDataId"); + + b.ToTable("ReadingConsistentClinicalDataPDF", t => + { + t.HasComment("一致性分析临床数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsPublicPage") + .HasColumnType("bit") + .HasComment("是否公共分页"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分页名称"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCriterionPage", t => + { + t.HasComment("阅片标准分页"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingCustomTag", t => + { + t.HasComment("项目阅片 - 自定义标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("问题答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalAnswerType") + .HasColumnType("int") + .HasComment("全局答案类型"); + + b.Property("GlobalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("全局任务Id"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("问题ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("原任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GlobalTaskId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingGlobalTaskInfo", t => + { + t.HasComment("阅片全局任务信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("JudgeTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("裁判任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskIdOne") + .HasColumnType("uniqueidentifier") + .HasComment("第一个任务ID"); + + b.Property("TaskIdTwo") + .HasColumnType("uniqueidentifier") + .HasComment("第二个任务ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingJudgeInfo", t => + { + t.HasComment("阅片裁判信息"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("对话内容"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UserTypeEnumInt") + .HasColumnType("int") + .HasComment("用户角色枚举"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("用户角色"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicalReviewDialog", t => + { + t.HasComment("阅片医学审核对话"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMedicineQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核问题Id"); + + b.Property("TaskMedicalReviewId") + .HasColumnType("uniqueidentifier") + .HasComment("医学审核Id"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskMedicalReviewId"); + + b.ToTable("ReadingMedicineQuestionAnswer", t => + { + t.HasComment("阅片医学问题答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsGeneral") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否是必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineSystemQuestion", t => + { + t.HasComment("阅片医学审核系统问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("bit") + .HasComment("是否必须"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目ID"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("ReadingMedicineTrialQuestion", t => + { + t.HasComment("阅片医学审核项目问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("结果"); + + b.Property("OncologyTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("肿瘤学 阅片任务ID"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier") + .HasComment("受试者Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生肿瘤学阅片任务的 访视类型的阅片任务Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("OncologyTaskId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingOncologyTaskInfo", t => + { + t.HasComment("阅片肿瘤学 针对访视任务 添加了一个结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("访视"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("SubjectVisitId"); + + b.ToTable("ReadingPeriodPlan", t => + { + t.HasComment("阅片计划"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EffectOfTime") + .HasColumnType("datetime2") + .HasComment("生效时间"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2") + .HasComment("截止日期"); + + b.Property("ExpirationVisitNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("截止访视"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsGlobal") + .HasColumnType("bit") + .HasComment("是否为全局阅片"); + + b.Property("IsTakeEffect") + .HasColumnType("int") + .HasComment("是否生效"); + + b.Property("ReadingPeriodName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("阅片期名称"); + + b.Property("ReadingScope") + .HasColumnType("int") + .HasComment("阅片范围"); + + b.Property("ReadingSetType") + .HasColumnType("int") + .HasComment("阅片配置的类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("VisitStageId"); + + b.ToTable("ReadingPeriodSet", t => + { + t.HasComment("阅片期设置 只会设计到所有人 或者某个Site 针对全局"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingPeriodSetId") + .HasColumnType("uniqueidentifier") + .HasComment("阅片期配置ID"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingPeriodSetId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("ReadingPeriodSite", t => + { + t.HasComment("阅片期和中心关联"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2") + .HasComment("确认时间"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionGroup") + .HasColumnType("int"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ReadingQuestionCriterionSystem", t => + { + t.HasComment("系统阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArbitrationRule") + .HasColumnType("int") + .HasComment("仲裁对象"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionGroup") + .HasColumnType("int"); + + b.Property("CriterionModalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CriterionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标准"); + + b.Property("CriterionType") + .HasColumnType("int") + .HasComment("标准类型"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("描述"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("修约小数点"); + + b.Property("EvaluationReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估原因"); + + b.Property("EvaluationResult") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("评估结果"); + + b.Property("FollowGlobalVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续全局自动分配默认状态"); + + b.Property("FollowJudgeTaskAutoAssignDefaultState") + .HasColumnType("int"); + + b.Property("FollowVisitAutoAssignDefaultState") + .HasColumnType("int") + .HasComment("后续访视自动分配默认状态"); + + b.Property("FormType") + .HasColumnType("int") + .HasComment("表单类型"); + + b.Property("GlobalUpdateType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片评估更新类型"); + + b.Property("ImageDownloadEnum") + .HasColumnType("int") + .HasComment("阅片过程下载影像"); + + b.Property("ImagePlatform") + .HasColumnType("int") + .HasComment("阅片平台"); + + b.Property("ImageUploadEnum") + .HasColumnType("int") + .HasComment("阅片过程上传影像"); + + b.Property("IsAdditionalAssessment") + .HasColumnType("bit") + .HasComment("是否附加评估"); + + b.Property("IsArbitrationReading") + .HasColumnType("bit") + .HasComment("仲裁阅片"); + + b.Property("IsAutoCreate") + .HasColumnType("bit") + .HasComment("自动 手动生成任务"); + + b.Property("IsCompleteConfig") + .HasColumnType("bit") + .HasComment("是否完成配置"); + + b.Property("IsConfirm") + .HasColumnType("bit") + .HasComment("是否确认"); + + b.Property("IsConfirmMedicineQuestion") + .HasColumnType("bit") + .HasComment("是确认医学审核问题"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsFollowGlobalVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续全局自动分配"); + + b.Property("IsFollowJudgeTaskAutoAssign") + .HasColumnType("bit"); + + b.Property("IsFollowVisitAutoAssign") + .HasColumnType("bit") + .HasComment("后续访视任务自动分配"); + + b.Property("IsGlobalReading") + .HasColumnType("bit") + .HasComment("是否生成全局阅片任务"); + + b.Property("IsImageFilter") + .HasColumnType("bit") + .HasComment("是否影像筛选"); + + b.Property("IsMustGlobalReading") + .HasColumnType("bit") + .HasComment("是否必须全局阅片"); + + b.Property("IsOncologyReading") + .HasColumnType("bit") + .HasComment("肿瘤学阅片 原字段 IsClinicalReading"); + + b.Property("IsReadingPeriod") + .HasColumnType("bit") + .HasComment("存在阅片期"); + + b.Property("IsReadingShowPreviousResults") + .HasColumnType("bit") + .HasComment("IR阅片页面是否可以查看既往任务结果"); + + b.Property("IsReadingShowSubjectInfo") + .HasColumnType("bit") + .HasComment("阅片是否显示受试者信息"); + + b.Property("IsReadingTaskViewInOrder") + .HasColumnType("int") + .HasComment("任务展示访视 读片任务显示是否顺序"); + + b.Property("IsShowDetail") + .HasColumnType("bit") + .HasComment("是否显示详情"); + + b.Property("IsSigned") + .HasColumnType("bit") + .HasComment("是否签名"); + + b.Property("IsSystemSetOncology") + .HasColumnType("bit") + .HasComment("是否系统设置了 肿瘤学"); + + b.Property("IsUrgent") + .HasColumnType("bit") + .HasComment("是否加急"); + + b.Property("IseCRFShowInDicomReading") + .HasColumnType("bit") + .HasComment("eCRF报告是否显示在图像页面"); + + b.Property("ReadingInfoSignTime") + .HasColumnType("datetime2") + .HasComment("阅片信息签名时间"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准ID"); + + b.Property("ReadingTaskViewEnum") + .HasColumnType("int") + .HasComment("任务组织级别"); + + b.Property("ReadingTool") + .HasColumnType("int") + .HasComment("阅片工具"); + + b.Property("ReadingType") + .HasColumnType("int") + .HasComment("阅片模式"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SynchronizeOriginalTime") + .HasColumnType("datetime2") + .HasComment("同步器官时间"); + + b.Property("SynchronizeTime") + .HasColumnType("datetime2") + .HasComment("同步时间"); + + b.Property("TaskAllocateObjEnum") + .HasColumnType("int") + .HasComment("任务分配对象"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("ReadingQuestionCriterionTrial", t => + { + t.HasComment("项目阅片标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingQuestionCriterionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingQuestionCriterionSystemId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionSystem", t => + { + t.HasComment("系统阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerCombination") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案组合"); + + b.Property("AnswerGroup") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("答案分组"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题Id"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("ConvertShowType") + .HasColumnType("int") + .HasComment("转化显示类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("GlobalReadingShowType") + .HasColumnType("int") + .HasComment("全局阅片显示类型"); + + b.Property("GroupClassify") + .HasColumnType("int") + .HasComment("分组分类"); + + b.Property("GroupEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文分组"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组ID"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分组"); + + b.Property("HighlightAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("高亮问题的答案"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsAdditional") + .HasColumnType("bit"); + + b.Property("IsCopyLesions") + .HasColumnType("bit") + .HasComment("是否复制病灶"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeQuestion") + .HasColumnType("bit") + .HasComment("是否是裁判问题"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否是必须"); + + b.Property("IsShowInDicom") + .HasColumnType("bit") + .HasComment("是否显示在Dicom阅片中"); + + b.Property("JudgeDifferenceType") + .HasColumnType("int") + .HasComment("裁判百分比或绝对值的相差值匹配规则"); + + b.Property("JudgeDifferenceValue") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("裁判百分比或绝对值的相差值"); + + b.Property("JudgeType") + .HasColumnType("int") + .HasComment("裁判类型"); + + b.Property("LesionType") + .HasColumnType("int") + .HasComment("病灶类型"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("LimitShow") + .HasColumnType("int") + .HasComment("限制显示"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("序号标记"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题ID"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionGenre") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("QuestionType") + .HasColumnType("int") + .HasComment("问题类型"); + + b.Property("ReadingCriterionPageId") + .HasColumnType("uniqueidentifier") + .HasComment("标准分页Id"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目标准Id"); + + b.Property("ReadingQuestionSystemId") + .HasColumnType("uniqueidentifier") + .HasComment("系统问题ID"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemParentId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准的ParentId"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目Id"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("类型值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("ParentId"); + + b.HasIndex("ReadingCriterionPageId"); + + b.HasIndex("ReadingQuestionCriterionTrialId"); + + b.HasIndex("RelevanceId"); + + b.ToTable("ReadingQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int") + .HasComment("标准字典分组"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("IsSystemCriterion") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingSystemCriterionDictionary", t => + { + t.HasComment("系统标准 - 全局配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的CTSeriesId"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("首次添加任务ID"); + + b.Property("FristAddTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("第一次添加的任务ID"); + + b.Property("FromMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("来自于哪个标记"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCanEditPosition") + .HasColumnType("bit"); + + b.Property("IsCurrentTaskAdd") + .HasColumnType("bit") + .HasComment("是否是当前任务添加"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDicomReading") + .HasColumnType("bit") + .HasComment("是Dicom阅片"); + + b.Property("MarkTool") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("标记工具"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MergeRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganInfoId") + .HasColumnType("uniqueidentifier") + .HasComment("器官Id"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PTSeriesId") + .HasColumnType("uniqueidentifier") + .HasComment("融合的PTSeriesId"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("截图地址"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReportMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("报告页面显示来自于哪个标记"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RowMark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("病灶编号"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SplitOrMergeType") + .HasColumnType("int"); + + b.Property("SplitRowId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗位WL"); + + b.Property("WW") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("窗宽WW"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InstanceId"); + + b.HasIndex("MergeRowId"); + + b.HasIndex("OrganInfoId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("SplitRowId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableAnswerRowInfo", t => + { + t.HasComment("表格问题答案行数据"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("表格问题Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("RowId"); + + b.HasIndex("TableQuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTableQuestionAnswer", t => + { + t.HasComment("项目阅片 - 表格问题行记录子项答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据列"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("数据表名称"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier") + .HasComment("关联父问题"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int") + .HasComment("是否关联"); + + b.Property("IsEnable") + .HasColumnType("bit") + .HasComment("是否启用"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int") + .HasComment("最大问题数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表的问题Id ReadingQuestionSystem的Id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("显示父问题"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("显示父问题的值"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("备注"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序号"); + + b.Property("ShowQuestion") + .HasColumnType("int") + .HasComment("是否显示"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统标准Id"); + + b.Property("TableQuestionType") + .HasColumnType("int") + .HasComment("表格问题类型"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("值"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionSystem", t => + { + t.HasComment("系统表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算标记"); + + b.Property("ClassifyAlgorithms") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("分类算法"); + + b.Property("ClassifyEditType") + .HasColumnType("int"); + + b.Property("ClassifyShowType") + .HasColumnType("int"); + + b.Property("ClassifyTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("分类问题表格Id"); + + b.Property("ClassifyType") + .HasColumnType("int") + .HasComment("分类类型"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("CustomUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义单位"); + + b.Property("DataSource") + .HasColumnType("int") + .HasComment("数据来源"); + + b.Property("DataTableColumn") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DataTableName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + + b.Property("DependParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典code"); + + b.Property("ExportResultStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("导出结果"); + + b.Property("FileType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件类型"); + + b.Property("ImageCount") + .HasColumnType("int") + .HasComment("图片数量"); + + b.Property("IsCopy") + .HasColumnType("bit") + .HasComment("复制病灶的时候 是否复制这个问题"); + + b.Property("IsDepend") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("int"); + + b.Property("LimitEdit") + .HasColumnType("int") + .HasComment("限制编辑"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大答案长度"); + + b.Property("MaxRowCount") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionClassify") + .HasColumnType("int") + .HasComment("问题分类"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionMark") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReadingQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题的Id ReadingQuestionTrial的id"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Remark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("注释"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("ShowQuestion") + .HasColumnType("int"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TableQuestionType") + .HasColumnType("int"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Unit") + .HasColumnType("int") + .HasComment("单位"); + + b.Property("ValueType") + .HasColumnType("int") + .HasComment("数值类型"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DependParentId"); + + b.HasIndex("ReadingQuestionId"); + + b.ToTable("ReadingTableQuestionTrial", t => + { + t.HasComment("项目阅片问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("答案"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("GlobalChangeAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("全局阅片修改的答案"); + + b.Property("IsGlobalChange") + .HasColumnType("bit") + .HasComment("全局阅片是否修改"); + + b.Property("ReadingQuestionCriterionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题标准Id"); + + b.Property("ReadingQuestionTrialId") + .HasColumnType("uniqueidentifier") + .HasComment("项目问题Id"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ReadingQuestionTrialId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionAnswer", t => + { + t.HasComment("阅片任务答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FristAddTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("MarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("OrderMarkName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherInstanceId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherMarkTool") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherMeasureData") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OtherNumberOfFrames") + .HasColumnType("int"); + + b.Property("OtherPicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OtherSeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherStudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("PicturePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("QuestionId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("ReadingTaskQuestionMark", t => + { + t.HasComment("项目阅片 - 任务问题标记"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelevanceTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("关联的任务ID"); + + b.Property("RelevanceType") + .HasColumnType("int") + .HasComment("类型具体解释 看枚举"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier") + .HasComment("任务ID"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TaskId"); + + b.ToTable("ReadingTaskRelation", t => + { + t.HasComment("任务关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("CrterionDictionaryGroup") + .HasColumnType("int"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsBaseLineUse") + .HasColumnType("bit"); + + b.Property("IsFollowVisitUse") + .HasColumnType("bit"); + + b.Property("ParentCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CriterionId"); + + b.HasIndex("DictionaryId"); + + b.ToTable("ReadingTrialCriterionDictionary", t => + { + t.HasComment("项目阅片标准 - 全局配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AwardsHonors") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AwardsHonorsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Grants") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("GrantsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Publications") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PublicationsCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Research") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ResearchCN") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ResearchPublication", t => + { + t.HasComment("医生 - 科研学术记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Additional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BankCardNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorNameInBank") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IDCard") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RankId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("DoctorPayInformation", t => + { + t.HasComment("医生计费 - 支付信息表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAEIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("StudyCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPImageUpload", t => + { + t.HasComment("项目中心 - 影像推送记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPInstance", t => + { + t.HasComment("项目中心 - 推送Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EarliestStudyTime") + .HasColumnType("datetime2"); + + b.Property("LatestPushTime") + .HasColumnType("datetime2"); + + b.Property("LatestStudyTime") + .HasColumnType("datetime2"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPPatient", t => + { + t.HasComment("项目中心 - 推送检查患者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("SCPSeries", t => + { + t.HasComment("项目中心 - 推送序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsUploadFinished") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PatientIdStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PatientId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SCPStudy", t => + { + t.HasComment("项目中心 - 推送检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltKey") + .HasColumnType("bit"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CtrlKey") + .HasColumnType("bit"); + + b.Property("ImageToolType") + .HasColumnType("int") + .HasComment("影像工具类型"); + + b.Property("Keyboardkey") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对应的键盘按键"); + + b.Property("MetaKey") + .HasColumnType("bit"); + + b.Property("ShiftKey") + .HasColumnType("bit"); + + b.Property("ShortcutKeyEnum") + .HasColumnType("int") + .HasComment("按键枚举"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("ShortcutKey", t => + { + t.HasComment("用户配置 - 快捷键"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ContactName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DirectorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DirectorPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalId") + .HasColumnType("uniqueidentifier"); + + b.Property("Province") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SiteNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UniqueCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("HospitalId"); + + b.ToTable("Site", t => + { + t.HasComment("机构 - Site"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsTrialLevel") + .HasColumnType("bit"); + + b.Property("SponsorCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Sponsor", t => + { + t.HasComment("机构 - Sponsor"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArchiveFinishedTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FailedFileCount") + .HasColumnType("int"); + + b.Property("FileCount") + .HasColumnType("int"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicom") + .HasColumnType("bit"); + + b.Property("IsDicomReUpload") + .HasColumnType("bit"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RecordPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier") + .HasComment("Dicom/非Dicom"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UploadFinishedTime") + .HasColumnType("datetime2"); + + b.Property("UploadStartTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.ToTable("StudyMonitor", t => + { + t.HasComment("项目 - 影像上传监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("FinalSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("FirstGiveMedicineTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Height") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollment") + .HasColumnType("bit"); + + b.Property("IsReReadingOrBackInfluenceAnalysis") + .HasColumnType("bit") + .HasComment("重阅或者退回影响一致性分析"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LatestSubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentTime") + .HasColumnType("datetime2"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignDate") + .HasColumnType("datetime2") + .HasComment("知情同意书签署日期"); + + b.Property("Status") + .HasColumnType("int") + .HasComment("1 访视中,2 出组 3 访视结束"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitOverTime") + .HasColumnType("datetime2"); + + b.Property("Weight") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FinalSubjectVisitId"); + + b.HasIndex("LatestSubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("Subject", t => + { + t.HasComment("项目 - 受试者"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FinalAnswer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果"); + + b.Property("FinalTranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("最终结果翻字典"); + + b.Property("IsFinalResult") + .HasColumnType("bit") + .HasComment("是否是最终结果"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TranslateDictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("附加评估答案翻译字典"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingQuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingQuestionId"); + + b.ToTable("SubjectAdditionalEvaluationResult", t => + { + t.HasComment("受试者 - 附加评估标准结果"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.ToTable("SubjectCanceDoctor", t => + { + t.HasComment("受试者 - 阅片标准取消分配医生记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsJoinEvaluation") + .HasColumnType("bit") + .HasComment("是否参与评估"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluation", t => + { + t.HasComment("受试者 - 参与附加评估标准配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageDeterminationResultState") + .HasColumnType("int") + .HasComment("影像判断结果"); + + b.Property("ImageFilterState") + .HasColumnType("int") + .HasComment("影像筛选状态"); + + b.Property("IsGeneratedTask") + .HasColumnType("bit") + .HasComment("是否已生成任务"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsReading") + .HasColumnType("bit"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("SubjectCriteriaEvaluationVisitStudyFilter", t => + { + t.HasComment("受试者 - 附加评估标准影像筛选检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArmEnum") + .HasColumnType("int"); + + b.Property("AssignTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("ReplacedSubjectUserId") + .HasColumnType("uniqueidentifier") + .HasComment("该属性有值 说明该医生被替换了 分配的时候 要过滤掉"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("ReplacedSubjectUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("SubjectUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("Auditor") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ChallengeState") + .HasColumnType("int"); + + b.Property("CheckBackTime") + .HasColumnType("datetime2"); + + b.Property("CheckChallengeState") + .HasColumnType("int"); + + b.Property("CheckPassedTime") + .HasColumnType("datetime2"); + + b.Property("CheckResult") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CheckState") + .HasColumnType("int") + .HasComment("核查状态"); + + b.Property("CheckTime") + .HasColumnType("datetime2"); + + b.Property("CheckUserId") + .HasColumnType("uniqueidentifier") + .HasComment("一致性核查人Id"); + + b.Property("CloseTheReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关闭一致性质疑原因"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentActionUserExpireTime") + .HasColumnType("datetime2"); + + b.Property("CurrentActionUserId") + .HasColumnType("uniqueidentifier") + .HasComment("当前质控领取人"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EarliestScanDate") + .HasColumnType("datetime2"); + + b.Property("ForwardState") + .HasColumnType("int"); + + b.Property("ForwardTime") + .HasColumnType("datetime2"); + + b.Property("ForwardUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InPlan") + .HasColumnType("bit"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsCheckBack") + .HasColumnType("bit") + .HasComment("是否一致性核查回退"); + + b.Property("IsConfirmedClinicalData") + .HasColumnType("bit") + .HasComment("是否确认了、签名了 临床数据完整性"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollmentConfirm") + .HasColumnType("bit"); + + b.Property("IsFinalVisit") + .HasColumnType("bit"); + + b.Property("IsLostVisit") + .HasColumnType("bit"); + + b.Property("IsPMBackOrReReading") + .HasColumnType("bit"); + + b.Property("IsQCConfirmedReupload") + .HasColumnType("bit"); + + b.Property("IsTake") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVisitTaskGenerated") + .HasColumnType("bit"); + + b.Property("LatestScanDate") + .HasColumnType("datetime2") + .HasComment("最晚拍片日期"); + + b.Property("ManualPassReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("通过原因"); + + b.Property("OutPlanPreviousVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("计划外上一访视"); + + b.Property("PDState") + .HasColumnType("int"); + + b.Property("PreliminaryAuditTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("单审通过人"); + + b.Property("ReadingStatus") + .HasColumnType("int"); + + b.Property("RequestBackState") + .HasColumnType("int"); + + b.Property("ReviewAuditTime") + .HasColumnType("datetime2"); + + b.Property("ReviewAuditUserId") + .HasColumnType("uniqueidentifier") + .HasComment("双审通过人"); + + b.Property("SVENDTC") + .HasColumnType("datetime2"); + + b.Property("SVSTDTC") + .HasColumnType("datetime2"); + + b.Property("SVUPDES") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubmitState") + .HasColumnType("int") + .HasComment("提交状态"); + + b.Property("SubmitTime") + .HasColumnType("datetime2"); + + b.Property("SubmitUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitExecuted") + .HasColumnType("int") + .HasComment("0 未执行 1 执行了 2 不可用"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitStageId") + .HasColumnType("uniqueidentifier") + .HasComment("访视计划Id,计划外没有"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("CurrentActionUserId"); + + b.HasIndex("ForwardUserId"); + + b.HasIndex("OutPlanPreviousVisitId"); + + b.HasIndex("PreliminaryAuditUserId"); + + b.HasIndex("ReviewAuditUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubmitUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("SubjectVisit", t => + { + t.HasComment("受试者访视"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Element") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAdd") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ReplaceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TagDescriptionCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ValueRepresentation") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemAnonymization", t => + { + t.HasComment("系统 - 匿名化配置(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicDataTypeEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ValueCN") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.ToTable("SystemBasicData", t => + { + t.HasComment("系统 - 签名模板场景配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.ToTable("SystemClinicalQuestion", t => + { + t.HasComment("系统临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemClinicalTableQuestion", t => + { + t.HasComment("系统临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("SystemCriterionDictionaryCode", t => + { + t.HasComment("系统标准 - 字典配置 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocConfirmedIdentityUser", t => + { + t.HasComment("后台 - 系统文档签署记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("SystemDocumentId"); + + b.ToTable("SystemDocNeedConfirmedUserType", t => + { + t.HasComment("后台 - 系统文档需要签署用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DocUserSignType") + .HasColumnType("int"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.ToTable("SystemDocument", t => + { + t.HasComment("后台 - 系统签署文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableProjectEnum") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NoticeContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NoticeLevelEnum") + .HasColumnType("int"); + + b.Property("NoticeModeEnum") + .HasColumnType("int"); + + b.Property("NoticeStateEnum") + .HasColumnType("int"); + + b.Property("NoticeTypeEnum") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PublishedTime") + .HasColumnType("datetime2"); + + b.Property("PublishedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PublishedUserId"); + + b.ToTable("SystemNotice", t => + { + t.HasComment("后台 - 系统通知"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.ToTable("SystemNoticeUserRead", t => + { + t.HasComment("后台 - 系统通知用户读取记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("SystemNoticeId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SystemNoticeId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("SystemNoticeUserType", t => + { + t.HasComment("后台 - 系统通知用户类型配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EnrollId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsJudgeDoctor") + .HasColumnType("bit") + .HasComment("是否是裁判医生 裁判医生单独加入"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanReadingRatio") + .HasColumnType("int"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("EnrollId"); + + b.HasIndex("TrialId"); + + b.ToTable("TaskAllocationRule", t => + { + t.HasComment("项目阅片 - 分配规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindSubjectNumberOfPlaces") + .HasColumnType("int"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IntervalWeeks") + .HasColumnType("int"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsGenerateGlobalTask") + .HasColumnType("bit"); + + b.Property("IsHaveReadingPeriod") + .HasColumnType("bit"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanSubjectCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TaskConsistentRule", t => + { + t.HasComment("项目阅片 - 一致性分析生成任务配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InfluenceTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("OptType") + .HasColumnType("int") + .HasComment("对影响任务进行的操作"); + + b.Property("OriginalTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("InfluenceTaskId"); + + b.HasIndex("OriginalTaskId"); + + b.ToTable("TaskInfluence", t => + { + t.HasComment("项目阅片 - 退回重阅影响"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Anonymize") + .HasColumnType("bit"); + + b.Property("CPIStatus") + .HasColumnType("bit"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FrameOfReferenceUID") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HtmlPath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageColumns") + .HasColumnType("int"); + + b.Property("ImageRows") + .HasColumnType("int"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceNumber") + .HasColumnType("int"); + + b.Property("InstanceTime") + .HasColumnType("datetime2"); + + b.Property("NumberOfFrames") + .HasColumnType("int"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesId") + .HasColumnType("uniqueidentifier"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SliceLocation") + .HasColumnType("int"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SopInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WindowCenter") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("WindowWidth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SeriesId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskInstance", t => + { + t.HasComment("项目阅片 - 任务后处理Instance"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("AuditAdviceEnum") + .HasColumnType("int") + .HasComment("审核建议"); + + b.Property("AuditSignTime") + .HasColumnType("datetime2") + .HasComment("审核通过时间"); + + b.Property("AuditState") + .HasColumnType("int") + .HasComment("审核状态"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DialogCloseReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("对话关闭原因"); + + b.Property("DisagreeReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("不同意重阅原因"); + + b.Property("DoctorUserIdeaEnum") + .HasColumnType("int") + .HasComment("阅片人是否认同"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("文件名称"); + + b.Property("ImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("图片路径"); + + b.Property("IsApplyHeavyReading") + .HasColumnType("bit") + .HasComment("是否申请重阅"); + + b.Property("IsAutoGenerate") + .HasColumnType("bit"); + + b.Property("IsClosedDialog") + .HasColumnType("bit") + .HasComment("是否关闭对话"); + + b.Property("IsHaveQuestion") + .HasColumnType("bit") + .HasComment("是否有问题"); + + b.Property("IsInvalid") + .HasColumnType("bit") + .HasComment("无效的 为True无效"); + + b.Property("IsSendMessage") + .HasColumnType("bit") + .HasComment("是否发送消息"); + + b.Property("LatestReplyUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("MedicalDialogCloseEnum") + .HasColumnType("int") + .HasComment("医学审核对话关闭原因"); + + b.Property("MedicalManagerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PDRelationTaskIdListStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Questioning") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("质询问题"); + + b.Property("SaveConclusionTime") + .HasColumnType("datetime2") + .HasComment("保存结论时间"); + + b.Property("SaveQuestionTime") + .HasColumnType("datetime2") + .HasComment("保存问题的时间"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("LatestReplyUserId"); + + b.HasIndex("MedicalManagerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskMedicalReview", t => + { + t.HasComment("项目阅片 - 医学审核"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PlanGlobalCount") + .HasColumnType("int"); + + b.Property("PlanJudgeCount") + .HasColumnType("int"); + + b.Property("PlanTumorCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.ToTable("TaskMedicalReviewRule", t => + { + t.HasComment("项目阅片 - 一致性分析规则"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ImageOrientationPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImagePositionPatient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageResizePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImagerPixelSpacing") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SequenceName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesNumber") + .HasColumnType("int"); + + b.Property("SeriesTime") + .HasColumnType("datetime2"); + + b.Property("SliceThickness") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("StudyId"); + + b.ToTable("TaskSeries", t => + { + t.HasComment("项目阅片 - 任务后上传序列"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Property("SeqId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionNumber") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AcquisitionTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartExamined") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("InstanceCount") + .HasColumnType("int"); + + b.Property("InstitutionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Modalities") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ModalityForEdit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientAge") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientBirthDate") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PatientSex") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SeriesCount") + .HasColumnType("int"); + + b.Property("StudyCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyInstanceUid") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TriggerTime") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("SeqId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("TaskStudy", t => + { + t.HasComment("项目阅片 - 任务后上传检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttendedReviewerTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindBaseLineName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindFollowUpPrefix") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BodyPartTypes") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CROId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeDefalutDays") + .HasColumnType("int"); + + b.Property("ClinicalInformationTransmissionEnum") + .HasColumnType("int") + .HasComment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeclarationTypes") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("DigitPlaces") + .HasColumnType("int"); + + b.Property("EmailAuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码/授权码"); + + b.Property("EmailFromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件箱账号"); + + b.Property("EmailFromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发件人"); + + b.Property("EmailSMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("SMTP服务器"); + + b.Property("EmailSMTPServerPort") + .HasColumnType("int") + .HasComment("SMTP端口"); + + b.Property("ExpectedPatients") + .HasColumnType("int"); + + b.Property("Expedited") + .HasColumnType("int"); + + b.Property("ExperimentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("实验名称"); + + b.Property("GRRReviewers") + .HasColumnType("int"); + + b.Property("HeadPI") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("负责人PI"); + + b.Property("Indication") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCRAAuditClinicalInformation") + .HasColumnType("bit") + .HasComment("是否审核 临床信息"); + + b.Property("IsConfigureEmail") + .HasColumnType("bit") + .HasComment("是否配置过邮箱"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsEnrollementQualificationConfirm") + .HasColumnType("bit") + .HasComment("是否有 入组性确认"); + + b.Property("IsHaveFirstGiveMedicineDate") + .HasColumnType("bit") + .HasComment("是否 有基准时间(首次给药时间)"); + + b.Property("IsHaveSubjectAge") + .HasColumnType("bit") + .HasComment("是否有 受试者年龄"); + + b.Property("IsImageConsistencyVerification") + .HasColumnType("bit") + .HasComment("影像一致性核查"); + + b.Property("IsImageExport") + .HasColumnType("bit") + .HasComment("影像导出"); + + b.Property("IsImageReplicationAcrossTrial") + .HasColumnType("bit") + .HasComment("跨项目复制"); + + b.Property("IsNoticeSubjectCodeRule") + .HasColumnType("bit") + .HasComment("是否 提醒受试者编号规则"); + + b.Property("IsPACSConnect") + .HasColumnType("bit"); + + b.Property("IsPDProgressView") + .HasColumnType("bit") + .HasComment("PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)"); + + b.Property("IsQCQuestionConfirmed") + .HasColumnType("bit"); + + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + + b.Property("IsSubjectExpeditedView") + .HasColumnType("bit") + .HasComment("配置Suject Edit页面 是否显示 加急"); + + b.Property("IsSubjectSecondCodeView") + .HasColumnType("bit"); + + b.Property("IsSubjectSexView") + .HasColumnType("bit"); + + b.Property("IsTrialBasicLogicConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialPACSConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialProcessConfirmed") + .HasColumnType("bit"); + + b.Property("IsTrialStart") + .HasColumnType("bit"); + + b.Property("IsTrialUrgentConfirmed") + .HasColumnType("bit"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("IsVerifyVisitImageDate") + .HasColumnType("bit") + .HasComment("是否 验证拍片日期"); + + b.Property("MainResearchUnit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("主研单位"); + + b.Property("MessageFromClient") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("MessageFromClientName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Modalitys") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OutEnrollmentVisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("出组后计划外访视名称"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("PlanSiteCount") + .HasColumnType("int"); + + b.Property("PlanVisitCount") + .HasColumnType("int"); + + b.Property("PreliminaryAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ProjectCycle") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QCProcessEnum") + .HasColumnType("int") + .HasComment("QC流程 0 不审,1 单审,2双审"); + + b.Property("QCQuestionConfirmedTime") + .HasColumnType("datetime2"); + + b.Property("QCQuestionConfirmedUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadingMode") + .HasColumnType("int") + .HasComment("阅片方式"); + + b.Property("ResearchProgramNo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("研究方案号"); + + b.Property("ReviewAuditReuploadText") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewModeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewProtocol") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ReviewProtocolName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SponsorId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectCodeRule") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("受试者编号具体规则"); + + b.Property("SyncClinicalDataTime") + .HasColumnType("datetime2") + .HasComment("同步临床数据时间"); + + b.Property("TimePointsPerPatient") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TotalReviewers") + .HasColumnType("int"); + + b.Property("TrialCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialEnrollStatus") + .HasColumnType("int") + .HasComment("入组那一块的状态"); + + b.Property("TrialExtraConfigJsonStr") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialFinishTime") + .HasColumnType("datetime2") + .HasComment("项目完成时间"); + + b.Property("TrialFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TrialStatusStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("启动状态"); + + b.Property("TrialType") + .HasColumnType("int") + .HasComment("项目类型 1 正式项目、0 非正式项目 2是培训项目"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanConfirmed") + .HasColumnType("bit"); + + b.Property("VitrualSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CROId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IndicationTypeId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("QCQuestionConfirmedUserId"); + + b.HasIndex("ReviewModeId"); + + b.HasIndex("SponsorId"); + + b.ToTable("Trial", t => + { + t.HasComment("项目 - 项目基本信息与配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsHandAdd") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialBodyPart", t => + { + t.HasComment("项目 - 项目部位配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialClinicalDataSetId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialClinicalDataSetId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialClinicalDataSetCriterion", t => + { + t.HasComment("项目标准 - 临床数据配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalQuestionShowEnum") + .HasColumnType("int") + .HasComment("显示类型"); + + b.Property("ClinicalQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomCalculateMark") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier") + .HasComment("分组Id"); + + b.Property("IsCheckDate") + .HasColumnType("bit") + .HasComment("是否是检查日期"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("MaxQuestionCount") + .HasColumnType("int") + .HasComment("最大行数"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier") + .HasComment("父问题Id"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("父问题触发值"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemClinicalQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统临床问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("GroupId"); + + b.HasIndex("TrialClinicalId"); + + b.ToTable("TrialClinicalQuestion", t => + { + t.HasComment("项目临床数据问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalculateQuestions") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasComment("自定义计算问题"); + + b.Property("ClinicalCalculateMarkEnum") + .HasColumnType("int") + .HasComment("自定义计算标记"); + + b.Property("ClinicalOptionTypeEnum") + .HasColumnType("int") + .HasComment("临床数据选项类型(无,自定义)"); + + b.Property("ClinicalTableQuestionMarkEnum") + .HasColumnType("int") + .HasComment("问题标识"); + + b.Property("ClinicalTableQuestionType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("临床问题类型(分组,单选。)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("字典Code"); + + b.Property("DigitPlaces") + .HasColumnType("int") + .HasComment("小数点位数"); + + b.Property("IsRequired") + .HasColumnType("int") + .HasComment("是否必填"); + + b.Property("MaxAnswerLength") + .HasColumnType("int") + .HasComment("最大长度"); + + b.Property("QuestionEnName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题英文名称"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("外层问题Id"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("问题名称"); + + b.Property("RelevanceId") + .HasColumnType("uniqueidentifier") + .HasComment("关联ID"); + + b.Property("RelevanceValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("关联Value"); + + b.Property("ShowOrder") + .HasColumnType("int") + .HasComment("排序"); + + b.Property("SystemTableQuestionId") + .HasColumnType("uniqueidentifier") + .HasComment("系统表格问题Id"); + + b.Property("TrialClinicalId") + .HasColumnType("uniqueidentifier") + .HasComment("项目临床数据Id"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("自定义选项"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialClinicalTableQuestion", t => + { + t.HasComment("项目临床表格问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdditionalAssessmentType") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("IsSelected") + .HasColumnType("bit"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialCriterionAdditionalAssessmentType", t => + { + t.HasComment("项目 - 项目标准附加评估配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialCriterionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialCriterionId"); + + b.ToTable("TrialCriterionDictionaryCode"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CalledAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsTestOK") + .HasColumnType("bit"); + + b.Property("LatestTestTime") + .HasColumnType("datetime2"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialDicomAE", t => + { + t.HasComment("项目 - 项目DicomAE"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("KeyName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDictionary", t => + { + t.HasComment("项目 - 项目字典关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("ConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SignFirstViewTime") + .HasColumnType("datetime2"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ConfirmUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocConfirmedIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedConfirmUserTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialDocumentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NeedConfirmUserTypeId"); + + b.HasIndex("TrialDocumentId"); + + b.ToTable("TrialDocNeedConfirmedUserType", t => + { + t.HasComment("项目 - 项目文档需要签署的用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FileTypeId") + .HasColumnType("uniqueidentifier") + .HasComment("需要确认的项目用户 通过TrialId 关联 用中间表过滤"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignViewMinimumMinutes") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("FileTypeId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialDocument", t => + { + t.HasComment("项目 - 项目文档"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialEmailBlackUser", t => + { + t.HasComment("项目 - 项目邮件用户黑名单"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AttachCNPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AttachPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AuthorizationCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BusinessLevelEnum") + .HasColumnType("int"); + + b.Property("BusinessModuleEnum") + .HasColumnType("int"); + + b.Property("BusinessScenarioEnum") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionTypeEnum") + .HasColumnType("int"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailCron") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailDelaySeconds") + .HasColumnType("int") + .HasComment("邮件延时秒数,比如一个事件触发,延迟多少s后才发邮件"); + + b.Property("EmailHtmlContent") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailHtmlContentCN") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailTopic") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTopicCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailTypeEnum") + .HasColumnType("int"); + + b.Property("EmailUrgentEnum") + .HasColumnType("int"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FromName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsAutoSend") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsDistinguishCriteria") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsReturnRequired") + .HasColumnType("bit"); + + b.Property("SMTPServerAddress") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SMTPServerPort") + .HasColumnType("int"); + + b.Property("SysEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SysEmailNoticeConfigId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("TrialEmailNoticeConfig", t => + { + t.HasComment("项目 - 项目发送邮件配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailUserType") + .HasColumnType("int"); + + b.Property("TrialEmailNoticeConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TrialEmailNoticeConfigId"); + + b.ToTable("TrialEmailNoticeUser", t => + { + t.HasComment("项目 - 项目邮件收发配置用户类型"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CriterionType") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EvaluationContent") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExperienceDataType") + .HasColumnType("int"); + + b.Property("IndicationEnum") + .HasColumnType("int"); + + b.Property("IndicationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("OtherCriterion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OtherStages") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PhaseId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitReadingCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PhaseId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExperience", t => + { + t.HasComment("医生 - 项目临床经历"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EvaluationCriteriaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialExperienceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DoctorId"); + + b.HasIndex("EvaluationCriteriaId"); + + b.HasIndex("TrialExperienceId"); + + b.ToTable("TrialExperienceCriteria", t => + { + t.HasComment("医生 - 项目临床经历评估标准"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int") + .HasComment("邀请状态"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("IsSystemUser") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialExternalUser", t => + { + t.HasComment("项目 - 项目外部人员"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DicomStudyCount") + .HasColumnType("int"); + + b.Property("DownloadEndTime") + .HasColumnType("datetime2"); + + b.Property("DownloadStartTime") + .HasColumnType("datetime2"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ImageCount") + .HasColumnType("int"); + + b.Property("ImageSize") + .HasColumnType("bigint"); + + b.Property("ImageType") + .HasColumnType("int"); + + b.Property("IsSuccess") + .HasColumnType("bit"); + + b.Property("NoneDicomStudyCount") + .HasColumnType("int"); + + b.Property("SubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("一致性分析的就显示一致性分析的中心"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialImageDownload", t => + { + t.HasComment("项目 - 影像下载监控"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustmentMultiple") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsNewTrial") + .HasColumnType("bit") + .HasComment("是否有 为新项目"); + + b.Property("SowName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SowPath") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialAdditional") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialPaymentPrice", t => + { + t.HasComment("医生计费 - 项目支付配置"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsConfirm") + .HasColumnType("bit"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("LanguageType") + .HasColumnType("int") + .HasComment("语言类型"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentTriggerValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("下拉框、文本、单选、多选"); + + b.Property("TypeValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialQCQuestion", t => + { + t.HasComment("项目 - 质控问题"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answer") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentQCEnum") + .HasColumnType("int") + .HasComment("1代表第一个人QC数据 2 代表第二个人QC数据"); + + b.Property("QCProcessEnum") + .HasColumnType("int"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialQCQuestionConfigureId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialQCQuestionConfigureId"); + + b.ToTable("TrialQCQuestionAnswer", t => + { + t.HasComment("项目 - 质控问题表单答案"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("AdjudicationIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Global") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RefresherTraining") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Timepoint") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn24H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TimepointIn48H") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Training") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialRevenuesPrice", t => + { + t.HasComment("医生计费 - 项目工作量收入单价"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPriceVerification", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("bit"); + + b.Property("AdjudicationIn24H") + .HasColumnType("bit"); + + b.Property("AdjudicationIn48H") + .HasColumnType("bit"); + + b.Property("Downtime") + .HasColumnType("bit"); + + b.Property("Global") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("bit"); + + b.Property("ReviewerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Timepoint") + .HasColumnType("bit"); + + b.Property("TimepointIn24H") + .HasColumnType("bit"); + + b.Property("TimepointIn48H") + .HasColumnType("bit"); + + b.Property("Training") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkLoadDate") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("TrialRevenuesPriceVerification", t => + { + t.HasComment("医生计费 - 项目收入价格验证"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("SignCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SignCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SignText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialSign", t => + { + t.HasComment("项目 - 项目操作签名表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EnabledTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("SiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteAliasName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SiteId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialSite", t => + { + t.HasComment("项目 - 项目中心表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallingAE") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Port") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteDicomAE", t => + { + t.HasComment("项目 - 项目中心DicomAE表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EquipmentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Parameters") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ScannerType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.ToTable("TrialSiteEquipmentSurvey", t => + { + t.HasComment("项目 - 项目中心调研设备表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageEngravingCycle") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("EfficacyEvaluatorType") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsConfirmImagingTechnologist") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFollowStudyParameters") + .HasColumnType("bit"); + + b.Property("LatestBackReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotConfirmReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NotFollowReson") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PreliminaryTime") + .HasColumnType("datetime2"); + + b.Property("PreliminaryUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReviewerTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("PreliminaryUserId"); + + b.HasIndex("ReviewerUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.ToTable("TrialSiteSurvey", t => + { + t.HasComment("项目 - 项目中心调研表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialSiteUser", t => + { + t.HasComment("项目 - 项目中心用户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("InviteState") + .HasColumnType("int"); + + b.Property("IsGenerateAccount") + .HasColumnType("bit"); + + b.Property("IsGenerateSuccess") + .HasColumnType("bit"); + + b.Property("IsHistoryUser") + .HasColumnType("bit"); + + b.Property("IsHistoryUserDeleted") + .HasColumnType("bit"); + + b.Property("IsHistoryUserOriginDeleted") + .HasColumnType("bit"); + + b.Property("IsJoin") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("SystemUserId") + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); + + b.Property("TrialRoleCode") + .HasColumnType("int"); + + b.Property("TrialSiteSurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialSiteSurveyId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("TrialSiteUserSurvey", t => + { + t.HasComment("项目 - 项目中心调研用户表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("NowState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OriginState") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStateChange", t => + { + t.HasComment("项目 - 项目状态变更记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Memo") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OptUserType") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialStatus", t => + { + t.HasComment("项目 - 入组流程记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialUserId"); + + b.HasIndex("UserId"); + + b.ToTable("TrialUser", t => + { + t.HasComment("项目用户角色表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VirturalSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("TrialVirtualSiteCodeUpdate", t => + { + t.HasComment("项目 - 虚拟中心编号更新记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_IRECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_IRECIST1Point1", t => + { + t.HasComment("IRECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1", t => + { + t.HasComment("RECIST1Point1肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1BM", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("NewLesion") + .HasColumnType("int") + .HasComment("新病灶"); + + b.Property("NonTargetLesions") + .HasColumnType("int") + .HasComment("非靶病灶"); + + b.Property("OverallEfficacy") + .HasColumnType("int") + .HasComment("整体疗效"); + + b.Property("TargetLesion") + .HasColumnType("int") + .HasComment("靶病灶"); + + b.HasKey("Id"); + + b.ToTable("TumorAssessment_RECIST1Point1BM", t => + { + t.HasComment("RECIST1Point1BM肿瘤评估(系统标准)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionDescription") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("ScreenshotListStr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialSiteId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialSiteId"); + + b.HasIndex("VisitTaskId"); + + b.ToTable("UserFeedBack", t => + { + t.HasComment("后台 - 用户反馈"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IPRegion") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsLoginUncommonly") + .HasColumnType("bit") + .HasComment("异地登录"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LoginFaildName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginPassword") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LoginUserId") + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); + + b.Property("OptType") + .HasColumnType("int"); + + b.Property("OptUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); + + b.HasKey("Id"); + + b.HasIndex("ActionIdentityUserId"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TargetIdentityUserId"); + + b.ToTable("UserLog", t => + { + t.HasComment("后台 - 用户账户操作日志"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassWord") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("密码"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasComment("用户Id"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserPassWordLog", t => + { + t.HasComment("后台 - 用户修改密码"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsEnable") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PermissionStr") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeShortName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.ToTable("UserType", t => + { + t.HasComment("后台 - 系统用户类型 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DictionaryId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DictionaryId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeGroup", t => + { + t.HasComment("后台 - 用户类型组(需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("MenuId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MenuId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("UserTypeMenu", t => + { + t.HasComment("后台 - 系统用户类型菜单中间关系表 (需要同步)"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsPitchOn") + .HasColumnType("bit") + .HasComment("是否为默认"); + + b.Property("ShowOrder") + .HasColumnType("int"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WL") + .HasColumnType("int"); + + b.Property("WW") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("UserWLTemplate", t => + { + t.HasComment("用户配置 - WL模板"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("Vacation", t => + { + t.HasComment("医生 - 假期安排"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("验证码"); + + b.Property("CodeType") + .HasColumnType("int") + .HasComment("什么类型的验证码 邮箱|手机"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmailOrPhone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("发送的邮箱或者手机"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2") + .HasComment("过期时间"); + + b.Property("HasSend") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VerificationCode", t => + { + t.HasComment("后台 - 验证码记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("InconsistentCount") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VisitPlanInfluenceStat", t => + { + t.HasComment("项目配置 - 访视计划调整不一致数量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("HistoryWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsDicomStudy") + .HasColumnType("bit"); + + b.Property("IsOverWindowNowNotOverWindow") + .HasColumnType("bit"); + + b.Property("Modality") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("NowWindow") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StudyId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudyTime") + .HasColumnType("datetime2"); + + b.Property("SubjectVisitId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitPlanInfluenceStatId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("SubjectVisitId"); + + b.HasIndex("VisitPlanInfluenceStatId"); + + b.ToTable("VisitPlanInfluenceStudy", t => + { + t.HasComment("项目配置 - 访视计划调整影像检查"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsBaseLine") + .HasColumnType("bit"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsHaveFirstConfirmed") + .HasColumnType("bit"); + + b.Property("NeedGlobal") + .HasColumnType("bit"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitDay") + .HasColumnType("int"); + + b.Property("VisitName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("VisitNum") + .HasPrecision(18, 1) + .HasColumnType("decimal(18,1)"); + + b.Property("VisitWindowLeft") + .HasColumnType("int"); + + b.Property("VisitWindowRight") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitStage", t => + { + t.HasComment("项目配置 - 访视记录"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AllocateTime") + .HasColumnType("datetime2") + .HasComment("分配时间"); + + b.Property("ArmEnum") + .HasColumnType("int") + .HasComment("0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2"); + + b.Property("BeforeConvertedTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("转换之前的任务Id(转化的任务才有该值)"); + + b.Property("BlindSubjectCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("BlindTrialSiteCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("ConsistentAnalysisOriginalTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("针对产生的一致性任务而言,这个字段存储的是原始任务"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DoctorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpetidEmailNoticeTime") + .HasColumnType("datetime2") + .HasComment("通知IR加急阅片时间"); + + b.Property("FirstReadingTime") + .HasColumnType("datetime2") + .HasComment("首次阅片时间"); + + b.Property("ImageStudyState") + .HasColumnType("int"); + + b.Property("IsAnalysisCreate") + .HasColumnType("bit") + .HasComment("是否是一致性分析产生"); + + b.Property("IsAnalysisDiffToOriginalData") + .HasColumnType("bit") + .HasComment("阅片结果是否和原数据有差异"); + + b.Property("IsCanEditUrgentState") + .HasColumnType("bit") + .HasComment("是否和编辑加急状态"); + + b.Property("IsChangeTumorEvaluate") + .HasColumnType("bit") + .HasComment("是否修改了整体肿瘤评估"); + + b.Property("IsClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据是否签名"); + + b.Property("IsFrontTaskNeedSignButNotSign") + .HasColumnType("bit") + .HasComment("前序任务需要签名 但是未签名"); + + b.Property("IsGlobalHaveUpdate") + .HasColumnType("bit") + .HasComment("全局是否有更新"); + + b.Property("IsGroupDiffArm1") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm1是否有差异"); + + b.Property("IsGroupDiffArm2") + .HasColumnType("bit") + .HasComment("组件一致性和原Arm2是否有差异"); + + b.Property("IsHistoryConvertedTask") + .HasColumnType("bit") + .HasComment("重阅重置任务的 标注是转化之前的 还是转化之后的"); + + b.Property("IsNeedClinicalDataSign") + .HasColumnType("bit") + .HasComment("临床数据"); + + b.Property("IsPMSetBack") + .HasColumnType("bit") + .HasComment("PM 对该任务进行了回退 影响的任务不设置"); + + b.Property("IsReReadingCreate") + .HasColumnType("bit") + .HasComment("是否是重阅产生的,方便过滤数据"); + + b.Property("IsReadClinicalData") + .HasColumnType("bit") + .HasComment("IR是否阅读临床数据"); + + b.Property("IsSelfAnalysis") + .HasColumnType("bit") + .HasComment("是否是自身一致性"); + + b.Property("IsUrgent") + .HasColumnType("bit"); + + b.Property("JudgeResultImagePath") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)") + .HasComment("裁判结果的图片路径"); + + b.Property("JudgeResultRemark") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("裁判结果的备注"); + + b.Property("JudgeResultTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)"); + + b.Property("JudgeVisitTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("在访视或者全局任务上记录 裁判任务的Id"); + + b.Property("PastResultTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("既往任务Id 不包括自己"); + + b.Property("ReReadingApplyState") + .HasColumnType("int") + .HasComment("重阅状态"); + + b.Property("ReadingCategory") + .HasColumnType("int") + .HasComment("任务类型"); + + b.Property("ReadingTaskState") + .HasColumnType("int") + .HasComment("任务阅片状态"); + + b.Property("RelatedVisitTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("关联的访视任务ID (当前任务是访视任务的话会有自己)"); + + b.Property("ReportRelatedTaskIds") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasComment("报告任务关系 包含冻结"); + + b.Property("SignTime") + .HasColumnType("datetime2") + .HasComment("签名时间"); + + b.Property("SouceReadModuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceSubjectVisitId") + .HasColumnType("uniqueidentifier") + .HasComment("任务来源访视Id 方便回更访视读片状态"); + + b.Property("SubjectId") + .HasColumnType("uniqueidentifier"); + + b.Property("SuggesteFinishedTime") + .HasColumnType("datetime2"); + + b.Property("TaskAllocationState") + .HasColumnType("int") + .HasComment("分配状态"); + + b.Property("TaskBlindName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskUrgentRemake") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("任务加急类型"); + + b.Property("TaskUrgentType") + .HasColumnType("int") + .HasComment("加急类型"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("TrialReadingCriterionId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("VisitTaskNum") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasComment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorUserId"); + + b.HasIndex("JudgeResultTaskId"); + + b.HasIndex("JudgeVisitTaskId"); + + b.HasIndex("SouceReadModuleId"); + + b.HasIndex("SourceSubjectVisitId"); + + b.HasIndex("SubjectId"); + + b.HasIndex("TrialId"); + + b.HasIndex("TrialReadingCriterionId"); + + b.ToTable("VisitTask", t => + { + t.HasComment("项目阅片 - 阅片任务表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsCopyFollowForms") + .HasColumnType("bit") + .HasComment("仅仅包括全局和访视"); + + b.Property("IsCopyOrigenalForms") + .HasColumnType("bit"); + + b.Property("NewReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅申请 产生的新任务Id"); + + b.Property("OriginalReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("重阅原始任务Id 重阅会产生新的任务"); + + b.Property("RequestReReadingConfirmUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RequestReReadingReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingRejectReason") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("RequestReReadingResultEnum") + .HasColumnType("int"); + + b.Property("RequestReReadingTime") + .HasColumnType("datetime2"); + + b.Property("RequestReReadingType") + .HasColumnType("int") + .HasComment("申请回退类型"); + + b.Property("RequestReReadingUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RootReReadingTaskId") + .HasColumnType("uniqueidentifier") + .HasComment("产生重阅的根任务Id"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("NewReReadingTaskId"); + + b.HasIndex("OriginalReReadingTaskId"); + + b.HasIndex("RequestReReadingConfirmUserId"); + + b.HasIndex("RequestReReadingUserId"); + + b.HasIndex("RootReReadingTaskId"); + + b.HasIndex("TrialId"); + + b.ToTable("VisitTaskReReading", t => + { + t.HasComment("重阅申请流程记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("Min") + .HasColumnType("int"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("VolumeReward", t => + { + t.HasComment("医生计费 - 奖励"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjudication") + .HasColumnType("int"); + + b.Property("AdjudicationIn24H") + .HasColumnType("int"); + + b.Property("AdjudicationIn48H") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateUserType") + .HasColumnType("int"); + + b.Property("DataFrom") + .HasColumnType("int"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Downtime") + .HasColumnType("int"); + + b.Property("Global") + .HasColumnType("int"); + + b.Property("IsLock") + .HasColumnType("bit"); + + b.Property("RefresherTraining") + .HasColumnType("int"); + + b.Property("Timepoint") + .HasColumnType("int"); + + b.Property("TimepointIn24H") + .HasColumnType("int"); + + b.Property("TimepointIn48H") + .HasColumnType("int"); + + b.Property("Training") + .HasColumnType("int"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkTime") + .HasColumnType("datetime2"); + + b.Property("YearMonth") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("DoctorWorkload", t => + { + t.HasComment("医生计费 - 工作量记录表"); + }); + }); + + modelBuilder.Entity("IRaCIS.Core.Infra.EFCore.TestLength", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTimeList") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("StringList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("TestEnumList") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TestJsonObjectLsit") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TestLength"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("AttachmentList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("CheckChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", "ClinicalDataSystemSet") + .WithMany() + .HasForeignKey("SystemClinicalDataSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalDataTrialSetList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataSystemSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalFormList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", "ClinicalAnswerRowInfo") + .WithMany() + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalAnswerRowInfo"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "DicomSerie") + .WithMany("DicomInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomSerie"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("StudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("StudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("StudyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ConfigDictionary") + .WithMany() + .HasForeignKey("ConfigTypeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Parent") + .WithMany("ChildList") + .HasForeignKey("ParentId"); + + b.Navigation("ConfigDictionary"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany("DoctorList") + .HasForeignKey("HospitalId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Position") + .WithMany() + .HasForeignKey("PositionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Rank") + .WithMany() + .HasForeignKey("RankId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Speciality") + .WithMany() + .HasForeignKey("SpecialityId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Department"); + + b.Navigation("Hospital"); + + b.Navigation("Position"); + + b.Navigation("Rank"); + + b.Navigation("Speciality"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("CriterionFileList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("DoctorDicRelationList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Doctor"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "EmailNoticeConfig") + .WithMany("EmailNoticeUserTypeList") + .HasForeignKey("EmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany("EnrollList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("EnrollList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("DoctorUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", "Doctor") + .WithMany() + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") + .WithMany() + .HasForeignKey("TrialDetailId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Doctor"); + + b.Navigation("TrialDetail"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCategoryList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany("EnrollReadingCriteriaList") + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Enroll"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany() + .HasForeignKey("SiteId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.PublishLog", "PublishLog") + .WithMany() + .HasForeignKey("PublishLogId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishLog"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("NoneDicomStudyList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany("NoneDicomFileList") + .HasForeignKey("NoneDicomStudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "OriginNoneDicomStudy") + .WithMany("TaskNoneDicomFileList") + .HasForeignKey("OriginNoneDicomStudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskNoneDicomStudyFileList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("OriginNoneDicomStudy"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OrganInfo"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("HospitalEnt"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousHistoryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousOther", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousOtherList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("PreviousPDFList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousSurgery", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("PreviousSurgeryList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("QCChallengeList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCChallenge", "QCChallenge") + .WithMany("DialogList") + .HasForeignKey("QCChallengeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", null) + .WithMany("QCChallengeDialogList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("QCChallenge"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.QCQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany() + .HasForeignKey("ReadingPeriodSetId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadModuleList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadModuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModuleCriterionFrom", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalForm", "ClinicalForm") + .WithMany() + .HasForeignKey("ClinicalFormId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", null) + .WithMany("ReadModuleCriterionFromList") + .HasForeignKey("ReadModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalForm"); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("ClinicalDataList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ReadingClinicalDataList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingClinicalData", "ReadingClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany() + .HasForeignKey("ClinicalDataTrialSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("ReadingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("ReadingConsistentClinicalDataList") + .HasForeignKey("StudyId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("ReadModule"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", "ReadingConsistentClinicalData") + .WithMany("ReadingClinicalDataPDFList") + .HasForeignKey("ReadingConsistentClinicalDataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingConsistentClinicalData"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "GlobalVisitTask") + .WithMany("GlobalVisitResultList") + .HasForeignKey("GlobalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("QuestionId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("GlobalVisitTask"); + + b.Navigation("TrialReadingQuestion"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany("ReadingMedicalReviewDialogList") + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskMedicalReview", "TaskMedicalReview") + .WithMany() + .HasForeignKey("TaskMedicalReviewId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskMedicalReview"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", "ParentQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask") + .WithMany() + .HasForeignKey("OncologyTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("OncologyVisitTask"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodPlanList") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("SubjectVisit"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitStage", "VisitStage") + .WithMany() + .HasForeignKey("VisitStageId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitStage"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingPeriodSet", "ReadingPeriodSet") + .WithMany("ReadingPeriodSites") + .HasForeignKey("ReadingPeriodSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingPeriodSet"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialReadingCriterionList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ParentReadingQuestionSystem") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", "ReadingQuestionCriterionSystem") + .WithMany("ReadingQuestionSystemList") + .HasForeignKey("ReadingQuestionCriterionSystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "RelevanceReadingQuestionSystem") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionSystem"); + + b.Navigation("ReadingQuestionCriterionSystem"); + + b.Navigation("RelevanceReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "GroupInfo") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ParentReadingQuestionTrial") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingCriterionPage", "ReadingCriterionPage") + .WithMany("ReadingQuestionList") + .HasForeignKey("ReadingCriterionPageId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "ReadingQuestionCriterionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionCriterionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "RelevanceReadingQuestionTrial") + .WithMany() + .HasForeignKey("RelevanceId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupInfo"); + + b.Navigation("ParentReadingQuestionTrial"); + + b.Navigation("ReadingCriterionPage"); + + b.Navigation("ReadingQuestionCriterionTrial"); + + b.Navigation("RelevanceReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomInstance", "Instance") + .WithMany("ReadingTableAnswerRowInfoList") + .HasForeignKey("InstanceId") + .HasPrincipalKey("Id"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "MergeRow") + .WithMany() + .HasForeignKey("MergeRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.OrganInfo", "OrganInfo") + .WithMany() + .HasForeignKey("OrganInfoId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "SplitRow") + .WithMany() + .HasForeignKey("SplitRowId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("LesionList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Instance"); + + b.Navigation("MergeRow"); + + b.Navigation("OrganInfo"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("SplitRow"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", "Lesion") + .WithMany("LesionAnswerList") + .HasForeignKey("RowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "ReadingTableQuestionTrial") + .WithMany() + .HasForeignKey("TableQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Lesion"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("ReadingTableQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", "ReadingQuestionSystem") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionSystem"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", "DependParentQuestion") + .WithMany() + .HasForeignKey("DependParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany("ReadingTableQuestionTrialList") + .HasForeignKey("ReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DependParentQuestion"); + + b.Navigation("ReadingQuestionTrial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("ReadingQuestionTrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("ReadingTaskQuestionAnswerList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ReadingQuestionTrial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany() + .HasForeignKey("TaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("CriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Dictionary"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPSeries", "SCPSeries") + .WithMany("SCPInstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPSeries"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SCPStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient") + .WithMany("SCPStudyList") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Patient"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "Hospital") + .WithMany() + .HasForeignKey("HospitalId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Hospital"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") + .WithMany("DicomStudyMonitorList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany() + .HasForeignKey("StudyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DicomStudy"); + + b.Navigation("NoneDicomStudy"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TaskStudy"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "FinalSubjectVisit") + .WithMany() + .HasForeignKey("FinalSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "LatestSubjectVisit") + .WithMany() + .HasForeignKey("LatestSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FinalSubjectVisit"); + + b.Navigation("LatestSubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectAdditionalEvaluationResult") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "TrialReadingQuestion") + .WithMany() + .HasForeignKey("TrialReadingQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingQuestion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectCanceDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "subject") + .WithMany("SubjectCriteriaEvaluationList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + + b.Navigation("subject"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", null) + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany("SubjectCriteriaEvaluationVisitFilterList") + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomSeries", "Series") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "Study") + .WithMany("SubjectCriteriaEvaluationVisitStudyFilterList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Series"); + + b.Navigation("Study"); + + b.Navigation("SubjectVisit"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectUser", "ReplacedSubjectUser") + .WithMany("EarlierSubjectUserList") + .HasForeignKey("ReplacedSubjectUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectDoctorList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectDoctorUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("ReplacedSubjectUser"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") + .WithMany() + .HasForeignKey("CurrentActionUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") + .WithMany() + .HasForeignKey("ForwardUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "OutPlanPreviousVisit") + .WithMany() + .HasForeignKey("OutPlanPreviousVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") + .WithMany() + .HasForeignKey("PreliminaryAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") + .WithMany() + .HasForeignKey("ReviewAuditUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") + .WithMany() + .HasForeignKey("SubmitUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("SubjectVisitList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("CurrentActionUser"); + + b.Navigation("ForwardUser"); + + b.Navigation("OutPlanPreviousVisit"); + + b.Navigation("PreliminaryAuditUser"); + + b.Navigation("ReviewAuditUser"); + + b.Navigation("Subject"); + + b.Navigation("SubmitUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemBasicData", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ConfirmUser") + .WithMany("SystemDocConfirmedList") + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("SystemDocConfirmedUserList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfirmUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SystemDocument"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("SystemDocNeedConfirmedUserTypeList") + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemDocument", "SystemDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("SystemDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SystemDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") + .WithMany() + .HasForeignKey("PublishedUserId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("PublishedUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserReadList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SystemNotice", null) + .WithMany("NoticeUserTypeList") + .HasForeignKey("SystemNoticeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "NoticeUserType") + .WithMany() + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NoticeUserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Enroll", "Enroll") + .WithMany() + .HasForeignKey("EnrollId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("Enroll"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskConsistentRuleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "InfluenceTask") + .WithMany() + .HasForeignKey("InfluenceTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalTask") + .WithMany("TaskInfluenceList") + .HasForeignKey("OriginalTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("InfluenceTask"); + + b.Navigation("OriginalTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskSeries", "TaskSeries") + .WithMany("InstanceList") + .HasForeignKey("SeriesId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("InstanceList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskSeries"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") + .WithMany() + .HasForeignKey("LatestReplyUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") + .WithMany() + .HasForeignKey("MedicalManagerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskMedicalReviewList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("LatestReplyUser"); + + b.Navigation("MedicalManagerUser"); + + b.Navigation("Trial"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany() + .HasForeignKey("DoctorUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") + .WithMany("SeriesList") + .HasForeignKey("StudyId") + .HasPrincipalKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TaskStudy"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("TaskStudyList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("TaskStudyList") + .HasForeignKey("VisitTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.CRO", "CRO") + .WithMany() + .HasForeignKey("CROId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType") + .WithMany() + .HasForeignKey("IndicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") + .WithMany() + .HasForeignKey("QCQuestionConfirmedUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "ReviewMode") + .WithMany() + .HasForeignKey("ReviewModeId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Sponsor", "Sponsor") + .WithMany() + .HasForeignKey("SponsorId"); + + b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 => + { + b1.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b1.Property("IsDefault") + .HasColumnType("bit"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.Property("TrialName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b1.HasKey("TrialId", "Id"); + + b1.ToTable("Trial"); + + b1.ToJson("TrialObjectNameList"); + + b1.WithOwner() + .HasForeignKey("TrialId"); + }); + + b.Navigation("CRO"); + + b.Navigation("CreateUserRole"); + + b.Navigation("IndicationType"); + + b.Navigation("Phase"); + + b.Navigation("QCQuestionConfirmedUser"); + + b.Navigation("ReviewMode"); + + b.Navigation("Sponsor"); + + b.Navigation("TrialObjectNameList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialBodyPartList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "TrialClinicalDataSet") + .WithMany("TrialClinicalDataSetCriteriaList") + .HasForeignKey("TrialClinicalDataSetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialClinicalDataSetCriterionList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialClinicalDataSet"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", "GroupQuestin") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", "ClinicalDataTrialSet") + .WithMany("TrialClinicalQuestionList") + .HasForeignKey("TrialClinicalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClinicalDataTrialSet"); + + b.Navigation("CreateUserRole"); + + b.Navigation("GroupQuestin"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("TrialCriterionAdditionalAssessmentTypeList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Dictionary") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDicList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dictionary"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "User") + .WithMany() + .HasForeignKey("ConfirmUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("TrialDocConfirmedUserList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialDocument"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("NeedConfirmUserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument") + .WithMany("NeedConfirmedUserTypeList") + .HasForeignKey("TrialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialDocument"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "FileType") + .WithMany() + .HasForeignKey("FileTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialDocumentList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("FileType"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailBlackUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.EmailNoticeConfig", "SysEmailNoticeConfig") + .WithMany("TrialEmailNoticeConfigList") + .HasForeignKey("SysEmailNoticeConfigId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany() + .HasForeignKey("TrialReadingCriterionId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("SysEmailNoticeConfig"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig") + .WithMany("TrialEmailNoticeUserList") + .HasForeignKey("TrialEmailNoticeConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TrialEmailNoticeConfig"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Phase") + .WithMany() + .HasForeignKey("PhaseId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Phase"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperienceCriteria", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithMany("TrialExperienceCriteriaList") + .HasForeignKey("DoctorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EvaluationCriteria") + .WithMany() + .HasForeignKey("EvaluationCriteriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialExperience", null) + .WithMany("ExperienceCriteriaList") + .HasForeignKey("TrialExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationCriteria"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialIdentityUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "ParentQCQuestion") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("ParentQCQuestion"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure") + .WithMany("TrialQCQuestionAnswerList") + .HasForeignKey("TrialQCQuestionConfigureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialQCQuestionConfigure"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Site", "Site") + .WithMany("TrialSiteList") + .HasForeignKey("SiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Site"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteDicomAEList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteEquipmentSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("EquipmentType"); + + b.Navigation("TrialSiteSurvey"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") + .WithMany() + .HasForeignKey("PreliminaryUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") + .WithMany() + .HasForeignKey("ReviewerUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("TrialSiteSurveyList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("PreliminaryUser"); + + b.Navigation("ReviewerUser"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialSiteUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany("CRCUserList") + .HasForeignKey("TrialSiteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSiteSurvey", "TrialSiteSurvey") + .WithMany("TrialSiteUserSurveyList") + .HasForeignKey("TrialSiteSurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany() + .HasForeignKey("UserTypeId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TrialSiteSurvey"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialStateChangeList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("ClinicalTrialProjectDetails") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany() + .HasForeignKey("SubjectId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("UserFeedBackList") + .HasForeignKey("TrialId"); + + b.HasOne("IRaCIS.Core.Domain.Models.TrialSite", "TrialSite") + .WithMany() + .HasForeignKey("TrialSiteId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask") + .WithMany("UserFeedBackList") + .HasForeignKey("VisitTaskId"); + + b.Navigation("CreateUserRole"); + + b.Navigation("Subject"); + + b.Navigation("SubjectVisit"); + + b.Navigation("Trial"); + + b.Navigation("TrialSite"); + + b.Navigation("VisitTask"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") + .WithMany() + .HasForeignKey("TargetIdentityUserId"); + + b.Navigation("ActionIdentityUser"); + + b.Navigation("CreateUserRole"); + + b.Navigation("TargetIdentityUser"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "Group") + .WithMany() + .HasForeignKey("DictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeGroupList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeMenu", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.Menu", "Menu") + .WithMany("UserTypeMenuList") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserType") + .WithMany("UserTypeMenuList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Menu"); + + b.Navigation("UserType"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit") + .WithMany() + .HasForeignKey("SubjectVisitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", "VisitPlanInfluenceStat") + .WithMany("InfluenceStudyList") + .HasForeignKey("VisitPlanInfluenceStatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("SubjectVisit"); + + b.Navigation("VisitPlanInfluenceStat"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany() + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") + .WithMany("VisitTaskList") + .HasForeignKey("DoctorUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeResultTask") + .WithMany() + .HasForeignKey("JudgeResultTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "JudgeVisitTask") + .WithMany("JudgeVisitList") + .HasForeignKey("JudgeVisitTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadModule", "ReadModule") + .WithMany("ModuleTaskList") + .HasForeignKey("SouceReadModuleId"); + + b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SourceSubjectVisit") + .WithMany("VisitTaskList") + .HasForeignKey("SourceSubjectVisitId"); + + b.HasOne("IRaCIS.Core.Domain.Models.Subject", "Subject") + .WithMany("SubjectVisitTaskList") + .HasForeignKey("SubjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion") + .WithMany("VisitTaskList") + .HasForeignKey("TrialReadingCriterionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("DoctorUser"); + + b.Navigation("JudgeResultTask"); + + b.Navigation("JudgeVisitTask"); + + b.Navigation("ReadModule"); + + b.Navigation("SourceSubjectVisit"); + + b.Navigation("Subject"); + + b.Navigation("Trial"); + + b.Navigation("TrialReadingCriterion"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "NewReReadingTask") + .WithMany() + .HasForeignKey("NewReReadingTaskId"); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OriginalReReadingTask") + .WithMany() + .HasForeignKey("OriginalReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") + .WithMany() + .HasForeignKey("RequestReReadingConfirmUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") + .WithMany() + .HasForeignKey("RequestReReadingUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "RootReReadingTask") + .WithMany() + .HasForeignKey("RootReReadingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("VisitTaskReReadingList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("NewReReadingTask"); + + b.Navigation("OriginalReReadingTask"); + + b.Navigation("RequestReReadingConfirmUser"); + + b.Navigation("RequestReReadingUser"); + + b.Navigation("RootReReadingTask"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", null) + .WithMany("WorkloadList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => + { + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("TrialClinicalDataSetCriteriaList"); + + b.Navigation("TrialClinicalQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => + { + b.Navigation("ReadingTableAnswerRowInfoList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => + { + b.Navigation("DicomInstanceList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => + { + b.Navigation("DicomStudyMonitorList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("ReadingConsistentClinicalDataList"); + + b.Navigation("SeriesList"); + + b.Navigation("SubjectCriteriaEvaluationVisitStudyFilterList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Dictionary", b => + { + b.Navigation("ChildList"); + + b.Navigation("DoctorDicRelationList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => + { + b.Navigation("AttachmentList"); + + b.Navigation("CriterionFileList"); + + b.Navigation("DoctorDicRelationList"); + + b.Navigation("EnrollList"); + + b.Navigation("TrialExperienceCriteriaList"); + + b.Navigation("UserRole") + .IsRequired(); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => + { + b.Navigation("EmailNoticeUserTypeList"); + + b.Navigation("TrialEmailNoticeConfigList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => + { + b.Navigation("EnrollReadingCategoryList"); + + b.Navigation("EnrollReadingCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => + { + b.Navigation("DoctorList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => + { + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => + { + b.Navigation("NoneDicomFileList"); + + b.Navigation("TaskNoneDicomFileList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => + { + b.Navigation("DialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => + { + b.Navigation("ModuleTaskList"); + + b.Navigation("ReadModuleCriterionFromList"); + + b.Navigation("ReadingClinicalDataList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalData", b => + { + b.Navigation("ReadingClinicalDataPDFList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => + { + b.Navigation("ReadingQuestionList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => + { + b.Navigation("ReadingPeriodPlanList"); + + b.Navigation("ReadingPeriodSites"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => + { + b.Navigation("ReadingQuestionSystemList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => + { + b.Navigation("TrialClinicalDataSetCriterionList"); + + b.Navigation("TrialCriterionAdditionalAssessmentTypeList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => + { + b.Navigation("ReadingTableQuestionTrialList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => + { + b.Navigation("LesionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => + { + b.Navigation("SCPStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => + { + b.Navigation("SCPInstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => + { + b.Navigation("TrialSiteList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => + { + b.Navigation("ClinicalDataList"); + + b.Navigation("ClinicalFormList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectAdditionalEvaluationResult"); + + b.Navigation("SubjectCanceDoctorList"); + + b.Navigation("SubjectCriteriaEvaluationList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("SubjectDoctorList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("SubjectVisitTaskList"); + + b.Navigation("TaskStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => + { + b.Navigation("EarlierSubjectUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => + { + b.Navigation("CheckChallengeDialogList"); + + b.Navigation("NoneDicomStudyList"); + + b.Navigation("PreviousHistoryList"); + + b.Navigation("PreviousOtherList"); + + b.Navigation("PreviousPDFList"); + + b.Navigation("PreviousSurgeryList"); + + b.Navigation("QCChallengeDialogList"); + + b.Navigation("QCChallengeList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectCriteriaEvaluationVisitFilterList"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("SystemDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => + { + b.Navigation("NoticeUserReadList"); + + b.Navigation("NoticeUserTypeList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => + { + b.Navigation("ReadingMedicalReviewDialogList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => + { + b.Navigation("InstanceList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => + { + b.Navigation("InstanceList"); + + b.Navigation("SeriesList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Trial", b => + { + b.Navigation("ClinicalDataTrialSetList"); + + b.Navigation("ClinicalTrialProjectDetails"); + + b.Navigation("EnrollList"); + + b.Navigation("ReadModuleList"); + + b.Navigation("ReadingClinicalDataList"); + + b.Navigation("StudyList"); + + b.Navigation("SubjectDoctorUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TaskConsistentRuleList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TrialBodyPartList"); + + b.Navigation("TrialDicList"); + + b.Navigation("TrialDocumentList"); + + b.Navigation("TrialIdentityUserList"); + + b.Navigation("TrialReadingCriterionList"); + + b.Navigation("TrialSiteList"); + + b.Navigation("TrialSiteSurveyList"); + + b.Navigation("TrialSiteUserList"); + + b.Navigation("TrialStateChangeList"); + + b.Navigation("TrialUserRoleList"); + + b.Navigation("UserFeedBackList"); + + b.Navigation("VisitTaskList"); + + b.Navigation("VisitTaskReReadingList"); + + b.Navigation("WorkloadList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => + { + b.Navigation("NeedConfirmedUserTypeList"); + + b.Navigation("TrialDocConfirmedUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => + { + b.Navigation("TrialEmailBlackUserList"); + + b.Navigation("TrialEmailNoticeUserList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => + { + b.Navigation("ExperienceCriteriaList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => + { + b.Navigation("TrialQCQuestionAnswerList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => + { + b.Navigation("CRCUserList"); + + b.Navigation("SubjectList"); + + b.Navigation("SubjectVisitList"); + + b.Navigation("TrialSiteDicomAEList"); + + b.Navigation("TrialSiteSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => + { + b.Navigation("TrialSiteEquipmentSurveyList"); + + b.Navigation("TrialSiteUserSurveyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Navigation("UserRoleTrials"); + + b.Navigation("VisitTaskList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => + { + b.Navigation("SystemDocNeedConfirmedUserTypeList"); + + b.Navigation("UserList"); + + b.Navigation("UserTypeGroupList"); + + b.Navigation("UserTypeMenuList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => + { + b.Navigation("InfluenceStudyList"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => + { + b.Navigation("GlobalVisitResultList"); + + b.Navigation("JudgeVisitList"); + + b.Navigation("LesionList"); + + b.Navigation("ReadingTaskQuestionAnswerList"); + + b.Navigation("TaskInfluenceList"); + + b.Navigation("TaskMedicalReviewList"); + + b.Navigation("TaskNoneDicomStudyFileList"); + + b.Navigation("TaskStudyList"); + + b.Navigation("UserFeedBackList"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20250113080339_UserlogIsLoginUncommonly.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20250113080339_UserlogIsLoginUncommonly.cs new file mode 100644 index 000000000..d3ceb6b20 --- /dev/null +++ b/IRaCIS.Core.Infra.EFCore/Migrations/20250113080339_UserlogIsLoginUncommonly.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IRaCIS.Core.Infra.EFCore.Migrations +{ + /// + public partial class UserlogIsLoginUncommonly : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "IsLoginUncommonly", + table: "UserLog", + type: "bit", + nullable: false, + defaultValue: false, + comment: "异地登录"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "IsLoginUncommonly", + table: "UserLog"); + } + } +} diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs b/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs index f5737de5e..53c1c6a1a 100644 --- a/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs +++ b/IRaCIS.Core.Infra.EFCore/Migrations/IRaCISDBContextModelSnapshot.cs @@ -1355,6 +1355,16 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("City") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("CityCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + b.Property("Code") .HasColumnType("int"); @@ -1409,6 +1419,16 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("HospitalId") .HasColumnType("uniqueidentifier"); + b.Property("HospitalName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("HospitalNameCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + b.Property("HospitalOther") .IsRequired() .HasMaxLength(400) @@ -1569,6 +1589,16 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("TrialId") .HasColumnType("uniqueidentifier"); + b.Property("UniversityAffiliated") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UniversityAffiliatedCN") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + b.Property("UpdateTime") .HasColumnType("datetime2"); @@ -2667,6 +2697,127 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations }); }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("这个字段废除,放在用户角色上面,后续删除"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.ToTable("IdentityUser", t => + { + t.HasComment("后台 - 系统真实账户表"); + }); + }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.ImageShare", b => { b.Property("Id") @@ -5247,6 +5398,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("CreateUserId") .HasColumnType("uniqueidentifier"); + b.Property("CriterionGroup") + .HasColumnType("int"); + b.Property("CriterionName") .IsRequired() .HasMaxLength(400) @@ -5312,6 +5466,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("CreateUserId") .HasColumnType("uniqueidentifier"); + b.Property("CriterionGroup") + .HasColumnType("int"); + b.Property("CriterionModalitys") .IsRequired() .HasMaxLength(400) @@ -5576,10 +5733,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasColumnType("nvarchar(400)") .HasComment("字典code"); - b.Property("ExportIdentification") - .HasColumnType("int") - .HasComment("导出标识"); - b.Property("ExportResultStr") .IsRequired() .HasMaxLength(400) @@ -5785,6 +5938,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasColumnType("nvarchar(400)") .HasComment("答案分组"); + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + b.Property("CalculateQuestions") .IsRequired() .HasColumnType("nvarchar(max)") @@ -5846,10 +6004,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasColumnType("nvarchar(400)") .HasComment("字典code"); - b.Property("ExportIdentification") - .HasColumnType("int") - .HasComment("导出标识"); - b.Property("ExportResultStr") .IsRequired() .HasMaxLength(400) @@ -6431,6 +6585,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasColumnType("nvarchar(400)") .HasComment("数据表名称"); + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + b.Property("DependParentId") .HasColumnType("uniqueidentifier") .HasComment("关联父问题"); @@ -6441,10 +6601,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasColumnType("nvarchar(400)") .HasComment("字典code"); - b.Property("ExportIdentification") - .HasColumnType("int") - .HasComment("导出标识"); - b.Property("ExportResultStr") .IsRequired() .HasMaxLength(400) @@ -6590,6 +6746,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("CDISCCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + b.Property("CalculateQuestions") .IsRequired() .HasColumnType("nvarchar(max)") @@ -6645,6 +6806,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("DefaultValue") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)") + .HasComment("默认值"); + b.Property("DependParentId") .HasColumnType("uniqueidentifier"); @@ -6654,10 +6821,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasColumnType("nvarchar(400)") .HasComment("字典code"); - b.Property("ExportIdentification") - .HasColumnType("int") - .HasComment("导出标识"); - b.Property("ExportResultStr") .IsRequired() .HasMaxLength(400) @@ -6865,7 +7028,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("CreateUserId") .HasColumnType("uniqueidentifier"); - b.Property("FirstAddTaskId") + b.Property("FristAddTaskId") .HasColumnType("uniqueidentifier"); b.Property("InstanceId") @@ -6923,12 +7086,22 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("QuestionType") .HasColumnType("int"); + b.Property("RowId") + .HasColumnType("uniqueidentifier"); + + b.Property("RowIndex") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + b.Property("SeriesId") .HasColumnType("uniqueidentifier"); b.Property("StudyId") .HasColumnType("uniqueidentifier"); + b.Property("TableQuestionId") + .HasColumnType("uniqueidentifier"); + b.Property("VisitTaskId") .HasColumnType("uniqueidentifier"); @@ -9085,7 +9258,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations }); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9130,7 +9303,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasIndex("SystemDocumentId"); - b.ToTable("SystemDocConfirmedUser", t => + b.ToTable("SystemDocConfirmedIdentityUser", t => { t.HasComment("后台 - 系统文档签署记录"); }); @@ -10168,6 +10341,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("Code") .HasColumnType("int"); + b.Property("CollectImagesEnum") + .HasColumnType("int") + .HasComment("阅片任务产生之前 采集影像"); + b.Property("CreateTime") .HasColumnType("datetime2"); @@ -10297,6 +10474,18 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("IsQCQuestionConfirmed") .HasColumnType("bit"); + b.Property("IsSPMJoinReReadingApproval") + .HasColumnType("bit") + .HasComment("SPM 参与重阅审批"); + + b.Property("IsSPMJoinReviewerSelect") + .HasColumnType("bit") + .HasComment("SPM 参与阅片人筛选"); + + b.Property("IsSPMJoinSiteSurvey") + .HasColumnType("bit") + .HasComment("SPM 参与中心调研"); + b.Property("IsSubjectExpeditedView") .HasColumnType("bit") .HasComment("配置Suject Edit页面 是否显示 加急"); @@ -10992,7 +11181,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations }); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -11037,10 +11226,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasIndex("TrialDocumentId"); - b.ToTable("TrialDocConfirmedUser", t => - { - t.HasComment("项目 - 项目文档签署记录"); - }); + b.ToTable("TrialDocConfirmedIdentityUser"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType", b => @@ -11499,7 +11685,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasColumnType("nvarchar(400)"); b.Property("SystemUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); b.Property("TrialId") .HasColumnType("uniqueidentifier"); @@ -11525,6 +11712,58 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations }); }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletedTime") + .HasColumnType("datetime2"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("RemoveTime") + .HasColumnType("datetime2"); + + b.Property("TrialId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("TrialId"); + + b.ToTable("TrialIdentityUser", t => + { + t.HasComment("项目用户表"); + }); + }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => { b.Property("Id") @@ -12247,7 +12486,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations }); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12294,7 +12533,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.ToTable("TrialSiteUser", t => { - t.HasComment("项目 - 项目中心用户关系表"); + t.HasComment("项目 - 项目中心用户角色关系表"); }); }); @@ -12356,7 +12595,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasColumnType("nvarchar(400)"); b.Property("SystemUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasComment("IdentityUser 表的用户Id"); b.Property("TrialRoleCode") .HasColumnType("int"); @@ -12465,7 +12705,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations }); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12494,6 +12734,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("TrialId") .HasColumnType("uniqueidentifier"); + b.Property("TrialUserId") + .HasColumnType("uniqueidentifier"); + b.Property("UpdateTime") .HasColumnType("datetime2"); @@ -12509,11 +12752,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasIndex("TrialId"); + b.HasIndex("TrialUserId"); + b.HasIndex("UserId"); b.ToTable("TrialUser", t => { - t.HasComment("运维人员与项目关联关系表 - 实体"); + t.HasComment("项目用户角色表"); }); }); @@ -12633,146 +12878,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations }); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AutoCutNextTask") - .HasColumnType("bit") - .HasComment("自动切换下一个任务"); - - b.Property("Code") - .HasColumnType("int"); - - b.Property("CreateTime") - .HasColumnType("datetime2"); - - b.Property("CreateUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("DepartmentName") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("DoctorId") - .HasColumnType("uniqueidentifier") - .HasComment("医生生成账号后,会有值"); - - b.Property("EMail") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("EmailToken") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("IsFirstAdd") - .HasColumnType("bit") - .HasComment("首次登录需要修改密码"); - - b.Property("IsTestUser") - .HasColumnType("bit"); - - b.Property("IsZhiZhun") - .HasColumnType("bit") - .HasComment("内部用户 外部用户"); - - b.Property("LastChangePassWordTime") - .HasColumnType("datetime2") - .HasComment("上一次修改密码的时间"); - - b.Property("LastLoginIP") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("LastLoginTime") - .HasColumnType("datetime2"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("OrganizationName") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("Password") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("PasswordChanged") - .HasColumnType("bit"); - - b.Property("Phone") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("PositionName") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("SuperAdmin") - .HasColumnType("bit"); - - b.Property("UpdateTime") - .HasColumnType("datetime2"); - - b.Property("UpdateUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("UserTypeEnum") - .HasColumnType("int"); - - b.Property("UserTypeId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("CreateUserId"); - - b.HasIndex("DoctorId") - .IsUnique() - .HasFilter("[DoctorId] IS NOT NULL"); - - b.HasIndex("UserTypeId"); - - b.ToTable("User", t => - { - t.HasComment("后台 - 系统账户"); - }); - }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => { b.Property("Id") @@ -12845,6 +12950,19 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ActionIdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionUserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("ActionUserType") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + b.Property("CreateTime") .HasColumnType("datetime2"); @@ -12861,6 +12979,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasMaxLength(400) .HasColumnType("nvarchar(400)"); + b.Property("IsLoginUncommonly") + .HasColumnType("bit") + .HasComment("异地登录"); + + b.Property("JsonObj") + .IsRequired() + .HasColumnType("nvarchar(max)"); + b.Property("LoginFaildName") .IsRequired() .HasMaxLength(400) @@ -12872,22 +12998,27 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .HasColumnType("nvarchar(400)"); b.Property("LoginUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasComment("后续删除"); b.Property("OptType") .HasColumnType("int"); b.Property("OptUserId") .HasColumnType("uniqueidentifier") - .HasComment("被操作的人,自己操作的就是自己"); + .HasComment("被操作的人,自己操作的就是自己--后续删除"); + + b.Property("TargetIdentityUserId") + .HasColumnType("uniqueidentifier") + .HasComment("被操作的对象 admin 修改张三信息 张三是被操作对象"); b.HasKey("Id"); + b.HasIndex("ActionIdentityUserId"); + b.HasIndex("CreateUserId"); - b.HasIndex("LoginUserId"); - - b.HasIndex("OptUserId"); + b.HasIndex("TargetIdentityUserId"); b.ToTable("UserLog", t => { @@ -12906,6 +13037,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Property("CreateUserId") .HasColumnType("uniqueidentifier"); + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + b.Property("PassWord") .IsRequired() .HasMaxLength(400) @@ -12926,6 +13060,155 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations }); }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoCutNextTask") + .HasColumnType("bit") + .HasComment("自动切换下一个任务"); + + b.Property("Code") + .HasColumnType("int"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DepartmentName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("DoctorId") + .HasColumnType("uniqueidentifier") + .HasComment("医生生成账号后,会有值"); + + b.Property("EMail") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("EmailToken") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("IdentityUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsFirstAdd") + .HasColumnType("bit") + .HasComment("首次登录需要修改密码"); + + b.Property("IsTestUser") + .HasColumnType("bit"); + + b.Property("IsUserRoleDisabled") + .HasColumnType("bit"); + + b.Property("IsZhiZhun") + .HasColumnType("bit") + .HasComment("内部用户 外部用户"); + + b.Property("LastChangePassWordTime") + .HasColumnType("datetime2") + .HasComment("上一次修改密码的时间"); + + b.Property("LastLoginIP") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("LastLoginTime") + .HasColumnType("datetime2"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PasswordChanged") + .HasColumnType("bit"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SuperAdmin") + .HasColumnType("bit") + .HasComment("后续删除"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("UpdateUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("UserTypeEnum") + .HasColumnType("int"); + + b.Property("UserTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CreateUserId"); + + b.HasIndex("DoctorId") + .IsUnique() + .HasFilter("[DoctorId] IS NOT NULL"); + + b.HasIndex("IdentityUserId"); + + b.HasIndex("UserTypeId"); + + b.ToTable("User", t => + { + t.HasComment("后台 - 系统账户角色关系表"); + }); + }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserType", b => { b.Property("Id") @@ -13814,7 +14097,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -13826,25 +14109,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Doctor"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -13856,36 +14139,36 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SubjectVisit"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -13903,7 +14186,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalDataSystemSet"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); }); @@ -13916,7 +14199,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -13930,7 +14213,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalDataTrialSet"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Subject"); }); @@ -13943,7 +14226,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -13951,12 +14234,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalForm"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -13970,23 +14253,23 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalAnswerRowInfo"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -13998,25 +14281,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialReadingCriterion"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14030,7 +14313,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("VisitTaskId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialReadingCriterion"); @@ -14039,7 +14322,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14055,10 +14338,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.DicomStudy", "DicomStudy") .WithMany() .HasForeignKey("StudyId") + .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DicomSerie"); @@ -14067,7 +14351,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14080,14 +14364,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DicomStudy"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14111,7 +14395,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Subject"); @@ -14124,7 +14408,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("ConfigTypeId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14136,14 +14420,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ConfigDictionary"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Parent"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Doctor", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14169,7 +14453,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("SpecialityId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Department"); @@ -14184,7 +14468,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorCriterionFile", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14196,7 +14480,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Doctor"); }); @@ -14222,35 +14506,35 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.DoctorSummarize", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Education", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeConfig", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.EmailNoticeUserType", b => @@ -14266,7 +14550,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.Enroll", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14278,7 +14562,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") .WithMany() .HasForeignKey("DoctorUserId"); @@ -14288,7 +14572,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Doctor"); @@ -14299,7 +14583,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollDetail", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14312,12 +14596,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .IsRequired(); b.HasOne("IRaCIS.Core.Domain.Models.TrialStatusDetail", "TrialDetail") - .WithMany("IntoGroupDetails") + .WithMany() .HasForeignKey("TrialDetailId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Doctor"); @@ -14326,7 +14610,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCategory", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14338,14 +14622,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Enroll"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.EnrollReadingCriterion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14357,58 +14641,58 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Enroll"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.EventStoreRecord", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExchangeRate", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ExploreRecommend", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.FrontAuditConfig", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Hospital", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14418,25 +14702,36 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("SiteId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Site"); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.InspectionFile", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Internationalization", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14446,25 +14741,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("PublishLogId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("PublishLog"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14482,7 +14777,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Subject"); @@ -14491,7 +14786,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudyFile", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14511,7 +14806,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany("TaskNoneDicomStudyFileList") .HasForeignKey("VisitTaskId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("NoneDicomStudy"); @@ -14522,18 +14817,18 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganInfo", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.OrganTrialInfo", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14545,47 +14840,47 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("OrganInfo"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentAdjustment", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.PaymentDetail", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Postgraduate", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14595,7 +14890,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("HospitalId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("HospitalEnt"); }); @@ -14608,7 +14903,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14622,7 +14917,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalDataTrialSet"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SubjectVisit"); }); @@ -14635,7 +14930,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14649,14 +14944,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalDataTrialSet"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SubjectVisit"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousPDF", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14668,7 +14963,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SubjectVisit"); }); @@ -14681,7 +14976,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14695,29 +14990,29 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalDataTrialSet"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.PublishLog", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallenge", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") .WithMany() .HasForeignKey("LatestReplyUserId"); @@ -14727,7 +15022,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("LatestReplyUser"); @@ -14736,7 +15031,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCChallengeDialog", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14754,14 +15049,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("QCChallenge"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.QCQuestion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14771,25 +15066,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("ParentId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ParentQuestion"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.RankPrice", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadModule", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14823,7 +15118,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ReadingPeriodSet"); @@ -14844,7 +15139,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14858,7 +15153,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalForm"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalData", b => @@ -14869,7 +15164,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14905,7 +15200,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalDataTrialSet"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DicomStudy"); @@ -14920,7 +15215,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14932,7 +15227,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ReadingClinicalData"); }); @@ -14945,7 +15240,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -14981,7 +15276,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalDataTrialSet"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DicomStudy"); @@ -14996,7 +15291,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingConsistentClinicalDataPDF", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15008,36 +15303,36 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ReadingConsistentClinicalData"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCriterionPage", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingCustomTag", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15059,7 +15354,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("GlobalVisitTask"); @@ -15070,18 +15365,18 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingJudgeInfo", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15093,14 +15388,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TaskMedicalReview"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15112,14 +15407,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TaskMedicalReview"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineSystemQuestion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15129,14 +15424,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("ParentId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ParentQuestion"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15146,14 +15441,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("ParentId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ParentQuestion"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15171,7 +15466,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("OncologyVisitTask"); @@ -15180,7 +15475,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodPlan", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15198,7 +15493,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ReadingPeriodSet"); @@ -15207,7 +15502,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSet", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15217,14 +15512,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("VisitStageId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("VisitStage"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingPeriodSite", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15242,7 +15537,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ReadingPeriodSet"); @@ -15251,18 +15546,18 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15274,14 +15569,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionSystem", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15305,7 +15600,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("RelevanceId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("GroupInfo"); @@ -15318,7 +15613,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15346,7 +15641,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("RelevanceId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("GroupInfo"); @@ -15361,7 +15656,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15373,14 +15668,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Dictionary"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15415,7 +15710,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Instance"); @@ -15432,7 +15727,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15462,7 +15757,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Lesion"); @@ -15475,7 +15770,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15491,7 +15786,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DependParentQuestion"); @@ -15500,7 +15795,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15516,7 +15811,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DependParentQuestion"); @@ -15525,7 +15820,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15549,7 +15844,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ReadingQuestionTrial"); @@ -15558,7 +15853,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15576,7 +15871,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ReadingQuestionTrial"); @@ -15585,7 +15880,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTaskRelation", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15597,14 +15892,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("VisitTask"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15622,7 +15917,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Dictionary"); @@ -15631,29 +15926,29 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReviewerPayInformation", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPImageUpload", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15671,7 +15966,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); @@ -15680,7 +15975,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPInstance", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15696,10 +15991,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy") .WithMany("InstanceList") .HasForeignKey("StudyId") + .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SCPSeries"); @@ -15708,7 +16004,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPPatient", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15730,7 +16026,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Subject"); @@ -15741,7 +16037,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPSeries", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15754,14 +16050,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SCPStudy"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SCPStudy", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15789,7 +16085,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Patient"); @@ -15802,18 +16098,18 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.ShortcutKey", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Site", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15823,25 +16119,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("HospitalId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Hospital"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Sponsor", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.StudyMonitor", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15884,7 +16180,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DicomStudy"); @@ -15901,7 +16197,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.Subject", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15927,7 +16223,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("FinalSubjectVisit"); @@ -15940,7 +16236,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectAdditionalEvaluationResult", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15958,14 +16254,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialReadingQuestion"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCanceDoctor", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -15977,14 +16273,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Subject"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16002,7 +16298,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialReadingCriterion"); @@ -16011,7 +16307,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16035,7 +16331,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SubjectVisit"); @@ -16044,7 +16340,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16076,7 +16372,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Series"); @@ -16089,13 +16385,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectUser", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") .WithMany() .HasForeignKey("DoctorUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16117,7 +16413,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DoctorUser"); @@ -16130,17 +16426,17 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SubjectVisit", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CurrentActionUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CurrentActionUser") .WithMany() .HasForeignKey("CurrentActionUserId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "ForwardUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ForwardUser") .WithMany() .HasForeignKey("ForwardUserId"); @@ -16148,11 +16444,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("OutPlanPreviousVisitId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryAuditUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryAuditUser") .WithMany() .HasForeignKey("PreliminaryAuditUserId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewAuditUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewAuditUser") .WithMany() .HasForeignKey("ReviewAuditUserId"); @@ -16162,7 +16458,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "SubmitUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "SubmitUser") .WithMany() .HasForeignKey("SubmitUserId"); @@ -16178,7 +16474,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("CurrentActionUser"); @@ -16201,18 +16497,18 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemAnonymization", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemBasicData", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16222,14 +16518,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("ParentId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Parent"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalQuestion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16239,42 +16535,42 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("GroupId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("GroupQuestin"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemClinicalTableQuestion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedUser", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "ConfirmUser") + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ConfirmUser") .WithMany("SystemDocConfirmedList") .HasForeignKey("ConfirmUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16288,7 +16584,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ConfirmUser"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SystemDocument"); }); @@ -16314,7 +16610,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocument", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16326,31 +16622,31 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("FileType"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "PublishedUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PublishedUser") .WithMany() .HasForeignKey("PublishedUserId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("PublishedUser"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserRead", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16362,12 +16658,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNoticeUserType", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16385,20 +16681,20 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("NoticeUserType"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskAllocationRule", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") .WithMany() .HasForeignKey("DoctorUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16416,7 +16712,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DoctorUser"); @@ -16427,7 +16723,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskConsistentRule", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16445,7 +16741,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); @@ -16454,7 +16750,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInfluence", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16472,7 +16768,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("InfluenceTask"); @@ -16481,7 +16777,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskInstance", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16497,10 +16793,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy") .WithMany("InstanceList") .HasForeignKey("StudyId") + .HasPrincipalKey("Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TaskSeries"); @@ -16509,17 +16806,17 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReview", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "LatestReplyUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "LatestReplyUser") .WithMany() .HasForeignKey("LatestReplyUserId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "MedicalManagerUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "MedicalManagerUser") .WithMany() .HasForeignKey("MedicalManagerUserId"); @@ -16535,7 +16832,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("LatestReplyUser"); @@ -16548,26 +16845,26 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskMedicalReviewRule", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") .WithMany() .HasForeignKey("DoctorUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DoctorUser"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskSeries", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16580,14 +16877,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TaskStudy"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TaskStudy", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16605,7 +16902,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Subject"); @@ -16618,7 +16915,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("CROId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16634,7 +16931,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("PhaseId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "QCQuestionConfirmedUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "QCQuestionConfirmedUser") .WithMany() .HasForeignKey("QCQuestionConfirmedUserId"); @@ -16680,7 +16977,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("CRO"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("IndicationType"); @@ -16697,7 +16994,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16709,14 +17006,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalDataSetCriterion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16734,7 +17031,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialClinicalDataSet"); @@ -16743,7 +17040,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalQuestion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16761,25 +17058,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ClinicalDataTrialSet"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("GroupQuestin"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialClinicalTableQuestion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionAdditionalAssessmentType", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16791,14 +17088,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialReadingCriterion"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16810,20 +17107,20 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialReadingCriterion"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDictionary", b => @@ -16845,15 +17142,15 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("Trial"); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedUser", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "User") .WithMany() .HasForeignKey("ConfirmUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16865,7 +17162,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialDocument"); @@ -16893,7 +17190,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocument", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16911,7 +17208,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("FileType"); @@ -16926,7 +17223,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -16939,7 +17236,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16959,7 +17256,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("TrialReadingCriterionId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SysEmailNoticeConfig"); @@ -16981,7 +17278,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExperience", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -16995,7 +17292,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("TrialId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Phase"); @@ -17027,7 +17324,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialExternalUser", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17039,14 +17336,41 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); + + b.Navigation("Trial"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserTrialList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") + .WithMany("TrialIdentityUserList") + .HasForeignKey("TrialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); b.Navigation("Trial"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialImageDownload", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17064,7 +17388,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Subject"); @@ -17073,7 +17397,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17085,14 +17409,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17108,7 +17432,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("ParentQCQuestion"); @@ -17117,7 +17441,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17129,36 +17453,36 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialQCQuestionConfigure"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialRevenuesPrice", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSign", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSite", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17174,7 +17498,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Site"); @@ -17183,7 +17507,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteDicomAE", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17195,14 +17519,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialSite"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17220,7 +17544,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("EquipmentType"); @@ -17229,17 +17553,17 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteSurvey", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "PreliminaryUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "PreliminaryUser") .WithMany() .HasForeignKey("PreliminaryUserId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "ReviewerUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "ReviewerUser") .WithMany() .HasForeignKey("ReviewerUserId"); @@ -17255,7 +17579,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("PreliminaryUser"); @@ -17266,9 +17590,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("TrialSite"); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUser", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserRole", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17286,24 +17610,24 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "User") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); b.Navigation("TrialSite"); - b.Navigation("User"); + b.Navigation("UserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialSiteUserSurvey", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17319,7 +17643,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany() .HasForeignKey("UserTypeId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("TrialSiteSurvey"); @@ -17328,7 +17652,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStateChange", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17340,14 +17664,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17359,75 +17683,60 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUser", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialUserRole", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("IRaCIS.Core.Domain.Models.Trial", "Trial") - .WithMany("TrialUserList") + .WithMany("TrialUserRoleList") .HasForeignKey("TrialId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "User") - .WithMany("UserTrials") + b.HasOne("IRaCIS.Core.Domain.Models.TrialIdentityUser", "TrialUser") + .WithMany("TrialUserRoleList") + .HasForeignKey("TrialUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "UserRole") + .WithMany("UserRoleTrials") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); - b.Navigation("User"); + b.Navigation("TrialUser"); + + b.Navigation("UserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialVirtualSiteCodeUpdate", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); - }); - - modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => - { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") - .WithMany() - .HasForeignKey("CreateUserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) - .WithOne("User") - .HasForeignKey("IRaCIS.Core.Domain.Models.User", "DoctorId"); - - b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") - .WithMany("UserList") - .HasForeignKey("UserTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CreateUser"); - - b.Navigation("UserTypeRole"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserFeedBack", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17453,7 +17762,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .WithMany("UserFeedBackList") .HasForeignKey("VisitTaskId"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Subject"); @@ -17468,36 +17777,67 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserLog", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "ActionIdentityUser") + .WithMany() + .HasForeignKey("ActionIdentityUserId"); + + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "LoginUser") + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "TargetIdentityUser") .WithMany() - .HasForeignKey("LoginUserId"); + .HasForeignKey("TargetIdentityUserId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "OptUser") - .WithMany() - .HasForeignKey("OptUserId"); + b.Navigation("ActionIdentityUser"); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); - b.Navigation("LoginUser"); - - b.Navigation("OptUser"); + b.Navigation("TargetIdentityUser"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserPassWordLog", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); + }); + + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => + { + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") + .WithMany() + .HasForeignKey("CreateUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.Doctor", null) + .WithOne("UserRole") + .HasForeignKey("IRaCIS.Core.Domain.Models.UserRole", "DoctorId"); + + b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser") + .WithMany("UserRoleList") + .HasForeignKey("IdentityUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("IRaCIS.Core.Domain.Models.UserType", "UserTypeRole") + .WithMany("UserList") + .HasForeignKey("UserTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreateUserRole"); + + b.Navigation("IdentityUser"); + + b.Navigation("UserTypeRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserTypeGroup", b => @@ -17540,51 +17880,51 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserWLTemplate", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Vacation", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.VerificationCode", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStat", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitPlanInfluenceStudy", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17602,7 +17942,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("SubjectVisit"); @@ -17611,7 +17951,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitStage", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17623,20 +17963,20 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("Trial"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTask", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "DoctorUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "DoctorUser") .WithMany("VisitTaskList") .HasForeignKey("DoctorUserId"); @@ -17674,7 +18014,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("DoctorUser"); @@ -17695,7 +18035,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.VisitTaskReReading", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17711,11 +18051,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingConfirmUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingConfirmUser") .WithMany() .HasForeignKey("RequestReReadingConfirmUserId"); - b.HasOne("IRaCIS.Core.Domain.Models.User", "RequestReReadingUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "RequestReReadingUser") .WithMany() .HasForeignKey("RequestReReadingUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17733,7 +18073,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); b.Navigation("NewReReadingTask"); @@ -17750,18 +18090,18 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations modelBuilder.Entity("IRaCIS.Core.Domain.Models.VolumeReward", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.Workload", b => { - b.HasOne("IRaCIS.Core.Domain.Models.User", "CreateUser") + b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") .WithMany() .HasForeignKey("CreateUserId") .OnDelete(DeleteBehavior.Cascade) @@ -17773,7 +18113,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("CreateUser"); + b.Navigation("CreateUserRole"); }); modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b => @@ -17829,7 +18169,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("TrialExperienceCriteriaList"); - b.Navigation("User") + b.Navigation("UserRole") .IsRequired(); }); @@ -17852,6 +18192,15 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("DoctorList"); }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b => + { + b.Navigation("SystemDocConfirmedList"); + + b.Navigation("UserRoleList"); + + b.Navigation("UserTrialList"); + }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.Menu", b => { b.Navigation("UserTypeMenuList"); @@ -18075,6 +18424,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("TrialDocumentList"); + b.Navigation("TrialIdentityUserList"); + b.Navigation("TrialReadingCriterionList"); b.Navigation("TrialSiteList"); @@ -18085,7 +18436,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("TrialStateChangeList"); - b.Navigation("TrialUserList"); + b.Navigation("TrialUserRoleList"); b.Navigation("UserFeedBackList"); @@ -18115,6 +18466,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("ExperienceCriteriaList"); }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b => + { + b.Navigation("TrialUserRoleList"); + }); + modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialQCQuestion", b => { b.Navigation("TrialQCQuestionAnswerList"); @@ -18140,16 +18496,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations b.Navigation("TrialSiteUserSurveyList"); }); - modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialStatusDetail", b => + modelBuilder.Entity("IRaCIS.Core.Domain.Models.UserRole", b => { - b.Navigation("IntoGroupDetails"); - }); - - modelBuilder.Entity("IRaCIS.Core.Domain.Models.User", b => - { - b.Navigation("SystemDocConfirmedList"); - - b.Navigation("UserTrials"); + b.Navigation("UserRoleTrials"); b.Navigation("VisitTaskList"); }); diff --git a/IRaCIS.Core.Infra.EFCore/Repository/IRepository.cs b/IRaCIS.Core.Infra.EFCore/Repository/IRepository.cs index ddecbf4d5..0b2e88343 100644 --- a/IRaCIS.Core.Infra.EFCore/Repository/IRepository.cs +++ b/IRaCIS.Core.Infra.EFCore/Repository/IRepository.cs @@ -395,7 +395,7 @@ namespace IRaCIS.Core.Infra.EFCore public async Task BatchUpdateNoTrackingAsync(Expression> whereFilter, Expression> updateFactory) where T : Entity { - return await _dbContext.BatchUpdateNoTrackingAsync(whereFilter, updateFactory, _userInfo.Id); + return await _dbContext.BatchUpdateNoTrackingAsync(whereFilter, updateFactory, _userInfo.UserRoleId); //return await _dbContext.Set().IgnoreQueryFilters().Where(whereFilter).BatchUpdateAsync(updateFactory).ConfigureAwait(false) > 0; diff --git a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs index 300fe9ef1..741686c83 100644 --- a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs +++ b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs @@ -268,7 +268,7 @@ namespace IRaCIS.Core.Infra.EFCore Expression> updateFactory) { - return await _dbContext.BatchUpdateNoTrackingAsync(where, updateFactory, _userInfo.Id); + return await _dbContext.BatchUpdateNoTrackingAsync(where, updateFactory, _userInfo.UserRoleId); } diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/IQueryablePageListExtensions.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/IQueryablePageListExtensions.cs index 1e98ae975..c8113106c 100644 --- a/IRaCIS.Core.Infrastructure/_IRaCIS/IQueryablePageListExtensions.cs +++ b/IRaCIS.Core.Infrastructure/_IRaCIS/IQueryablePageListExtensions.cs @@ -136,6 +136,7 @@ namespace IRaCIS.Core.Infrastructure.Extention var propName = string.Empty; + //前端传递 以前端为准 if (string.IsNullOrWhiteSpace(pageInput.SortField)) { propName = sortField; diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs index d73a3cea9..c337afc0f 100644 --- a/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs +++ b/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs @@ -280,7 +280,7 @@ public static class StaticData public const string OCT_ReadingLession_Export = "OCT_ReadingLession_Export"; - + public const string CDISC_Reading_Export = "CDISC_Reading_Export"; public const string IVUSTheMeasuredValueOfEachMatchedFragment = "IVUS_TheMeasuredValueOfEachMatchedFragment";